Search Results for

    Show / Hide Table of Contents

    Class InsertOrUpdateProvider<T1>

    Inheritance
    System.Object
    InsertOrUpdateProvider
    InsertOrUpdateProvider<T1>
    Implements
    IInsertOrUpdate<T1>
    Inherited Members
    InsertOrUpdateProvider._orm
    InsertOrUpdateProvider._commonUtils
    InsertOrUpdateProvider._commonExpression
    InsertOrUpdateProvider._doNothing
    InsertOrUpdateProvider._updateIgnore
    InsertOrUpdateProvider._auditValueChangedDict
    InsertOrUpdateProvider._updateSetDict
    InsertOrUpdateProvider._table
    InsertOrUpdateProvider._tempPrimarys
    InsertOrUpdateProvider._tableRule
    InsertOrUpdateProvider._params
    InsertOrUpdateProvider._transaction
    InsertOrUpdateProvider._connection
    InsertOrUpdateProvider._commandTimeout
    InsertOrUpdateProvider.IdentityColumn
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: FreeSql.Internal.CommonProvider
    Assembly: FreeSql.dll
    Syntax
    public abstract class InsertOrUpdateProvider<T1> : InsertOrUpdateProvider, IInsertOrUpdate<T1> where T1 : class
    Type Parameters
    Name Description
    T1

    Constructors

    | Improve this Doc View Source

    InsertOrUpdateProvider(IFreeSql, CommonUtils, CommonExpression)

    Declaration
    public InsertOrUpdateProvider(IFreeSql orm, CommonUtils commonUtils, CommonExpression commonExpression)
    Parameters
    Type Name Description
    IFreeSql orm
    CommonUtils commonUtils
    CommonExpression commonExpression

    Fields

    | Improve this Doc View Source

    _source

    Declaration
    public List<T1> _source
    Field Value
    Type Description
    System.Collections.Generic.List<T1>
    | Improve this Doc View Source

    _sourceSql

    Declaration
    public string _sourceSql
    Field Value
    Type Description
    System.String

    Methods

    | Improve this Doc View Source

    AsTable(Func<String, String>)

    Declaration
    public IInsertOrUpdate<T1> AsTable(Func<string, string> tableRule)
    Parameters
    Type Name Description
    System.Func<System.String, System.String> tableRule
    Returns
    Type Description
    IInsertOrUpdate<T1>
    | Improve this Doc View Source

    AsTable(String)

    Declaration
    public IInsertOrUpdate<T1> AsTable(string tableName)
    Parameters
    Type Name Description
    System.String tableName
    Returns
    Type Description
    IInsertOrUpdate<T1>
    | Improve this Doc View Source

    AsType(Type)

    Declaration
    public IInsertOrUpdate<T1> AsType(Type entityType)
    Parameters
    Type Name Description
    System.Type entityType
    Returns
    Type Description
    IInsertOrUpdate<T1>
    | Improve this Doc View Source

    AuditDataValue(Object, T1, IFreeSql, TableInfo, Dictionary<String, Boolean>)

    Declaration
    public static void AuditDataValue(object sender, T1 data, IFreeSql orm, TableInfo table, Dictionary<string, bool> changedDict)
    Parameters
    Type Name Description
    System.Object sender
    T1 data
    IFreeSql orm
    TableInfo table
    System.Collections.Generic.Dictionary<System.String, System.Boolean> changedDict
    | Improve this Doc View Source

    AuditDataValue(Object, IEnumerable<T1>, IFreeSql, TableInfo, Dictionary<String, Boolean>)

    Declaration
    public static void AuditDataValue(object sender, IEnumerable<T1> data, IFreeSql orm, TableInfo table, Dictionary<string, bool> changedDict)
    Parameters
    Type Name Description
    System.Object sender
    System.Collections.Generic.IEnumerable<T1> data
    IFreeSql orm
    TableInfo table
    System.Collections.Generic.Dictionary<System.String, System.Boolean> changedDict
    | Improve this Doc View Source

    ClearData()

    Declaration
    protected void ClearData()
    | Improve this Doc View Source

    CommandTimeout(Int32)

    Declaration
    public IInsertOrUpdate<T1> CommandTimeout(int timeout)
    Parameters
    Type Name Description
    System.Int32 timeout
    Returns
    Type Description
    IInsertOrUpdate<T1>
    | Improve this Doc View Source

    ExecuteAffrows()

    Declaration
    public int ExecuteAffrows()
    Returns
    Type Description
    System.Int32
    | Improve this Doc View Source

    ExecuteAffrowsAsync(CancellationToken)

    Declaration
    public async Task<int> ExecuteAffrowsAsync(CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    System.Threading.CancellationToken cancellationToken
    Returns
    Type Description
    System.Threading.Tasks.Task<System.Int32>
    | Improve this Doc View Source

    IfExistsDoNothing()

    Declaration
    public IInsertOrUpdate<T1> IfExistsDoNothing()
    Returns
    Type Description
    IInsertOrUpdate<T1>
    | Improve this Doc View Source

    RawExecuteAffrows()

    Declaration
    public int RawExecuteAffrows()
    Returns
    Type Description
    System.Int32
    | Improve this Doc View Source

    RawExecuteAffrowsAsync(CancellationToken)

    Declaration
    public async Task<int> RawExecuteAffrowsAsync(CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    System.Threading.CancellationToken cancellationToken
    Returns
    Type Description
    System.Threading.Tasks.Task<System.Int32>
    | Improve this Doc View Source

    SetSource(T1)

    Declaration
    public IInsertOrUpdate<T1> SetSource(T1 source)
    Parameters
    Type Name Description
    T1 source
    Returns
    Type Description
    IInsertOrUpdate<T1>
    | Improve this Doc View Source

    SetSource(T1, Expression<Func<T1, Object>>)

    Declaration
    public IInsertOrUpdate<T1> SetSource(T1 source, Expression<Func<T1, object>> tempPrimarys)
    Parameters
    Type Name Description
    T1 source
    System.Linq.Expressions.Expression<System.Func<T1, System.Object>> tempPrimarys
    Returns
    Type Description
    IInsertOrUpdate<T1>
    | Improve this Doc View Source

    SetSource(IEnumerable<T1>, Expression<Func<T1, Object>>)

    Declaration
    public IInsertOrUpdate<T1> SetSource(IEnumerable<T1> source, Expression<Func<T1, object>> tempPrimarys = null)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T1> source
    System.Linq.Expressions.Expression<System.Func<T1, System.Object>> tempPrimarys
    Returns
    Type Description
    IInsertOrUpdate<T1>
    | Improve this Doc View Source

    SetSource(String, Expression<Func<T1, Object>>)

    Declaration
    public virtual IInsertOrUpdate<T1> SetSource(string sql, Expression<Func<T1, object>> tempPrimarys = null)
    Parameters
    Type Name Description
    System.String sql
    System.Linq.Expressions.Expression<System.Func<T1, System.Object>> tempPrimarys
    Returns
    Type Description
    IInsertOrUpdate<T1>
    | Improve this Doc View Source

    SplitSourceByIdentityValueIsNull(List<T1>)

    如果实体类有自增属性,分成两个 List,有值的Item1 merge,无值的Item2 insert

    Declaration
    public NativeTuple<List<T1>[], List<T1>[]> SplitSourceByIdentityValueIsNull(List<T1> source)
    Parameters
    Type Name Description
    System.Collections.Generic.List<T1> source
    Returns
    Type Description
    NativeTuple<System.Collections.Generic.List<T1>[], System.Collections.Generic.List<T1>[]>
    | Improve this Doc View Source

    TableRuleInvoke()

    Declaration
    protected string TableRuleInvoke()
    Returns
    Type Description
    System.String
    | Improve this Doc View Source

    ToSql()

    Declaration
    public abstract string ToSql()
    Returns
    Type Description
    System.String
    | Improve this Doc View Source

    UpdateColumns(Expression<Func<T1, Object>>)

    Declaration
    public IInsertOrUpdate<T1> UpdateColumns(Expression<Func<T1, object>> columns)
    Parameters
    Type Name Description
    System.Linq.Expressions.Expression<System.Func<T1, System.Object>> columns
    Returns
    Type Description
    IInsertOrUpdate<T1>
    | Improve this Doc View Source

    UpdateColumns(String[])

    Declaration
    public IInsertOrUpdate<T1> UpdateColumns(string[] columns)
    Parameters
    Type Name Description
    System.String[] columns
    Returns
    Type Description
    IInsertOrUpdate<T1>
    | Improve this Doc View Source

    UpdateSet<TMember>(Expression<Func<T1, T1, TMember>>)

    Declaration
    public IInsertOrUpdate<T1> UpdateSet<TMember>(Expression<Func<T1, T1, TMember>> exp)
    Parameters
    Type Name Description
    System.Linq.Expressions.Expression<System.Func<T1, T1, TMember>> exp
    Returns
    Type Description
    IInsertOrUpdate<T1>
    Type Parameters
    Name Description
    TMember
    | Improve this Doc View Source

    WithConnection(DbConnection)

    Declaration
    public IInsertOrUpdate<T1> WithConnection(DbConnection connection)
    Parameters
    Type Name Description
    System.Data.Common.DbConnection connection
    Returns
    Type Description
    IInsertOrUpdate<T1>
    | Improve this Doc View Source

    WithTransaction(DbTransaction)

    Declaration
    public IInsertOrUpdate<T1> WithTransaction(DbTransaction transaction)
    Parameters
    Type Name Description
    System.Data.Common.DbTransaction transaction
    Returns
    Type Description
    IInsertOrUpdate<T1>
    | Improve this Doc View Source

    WriteSourceSelectUnionAll(List<T1>, StringBuilder, List<DbParameter>)

    Declaration
    public void WriteSourceSelectUnionAll(List<T1> source, StringBuilder sb, List<DbParameter> dbParams)
    Parameters
    Type Name Description
    System.Collections.Generic.List<T1> source
    System.Text.StringBuilder sb
    System.Collections.Generic.List<System.Data.Common.DbParameter> dbParams

    Implements

    IInsertOrUpdate<T1>
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX