Method InsertAsync
| Improve this Doc View SourceInsertAsync(CancellationToken)
Inserts default values into this database table.
Declaration
public Task<int> InsertAsync(CancellationToken ct = default(CancellationToken))Parameters
| Type | Name | Description | 
|---|---|---|
| System.Threading.CancellationToken | ct | The async cancellation token. | 
Returns
| Type | Description | 
|---|---|
| System.Threading.Tasks.Task<System.Int32> | Number of records inserted into this database table. | 
InsertAsync(Action<Nullable<Int64>>, CancellationToken)
Inserts default values into this database table.
Declaration
public Task<int> InsertAsync(Action<long? > outputIdentity, CancellationToken ct = default(CancellationToken))Parameters
| Type | Name | Description | 
|---|---|---|
| System.Action<System.Nullable<System.Int64>> | outputIdentity | Delegate to receive newly generated identity value. | 
| System.Threading.CancellationToken | ct | The async cancellation token. | 
Returns
| Type | Description | 
|---|---|
| System.Threading.Tasks.Task<System.Int32> | Number of records inserted into this database table. | 
InsertAsync(Action<ColumnMapper, T>, CancellationToken)
Inserts values into this database table.
Declaration
public Task<int> InsertAsync(Action<ColumnMapper, T> columnMapper, CancellationToken ct = default(CancellationToken))Parameters
| Type | Name | Description | 
|---|---|---|
| System.Action<ColumnMapper, T> | columnMapper | Provides column mappings between value and column in this table. | 
| System.Threading.CancellationToken | ct | The async cancellation token. | 
Returns
| Type | Description | 
|---|---|
| System.Threading.Tasks.Task<System.Int32> | Number of records inserted into this database table. | 
InsertAsync(Action<ColumnMapper, T>, Action<Nullable<Int64>>, CancellationToken)
Inserts values into this database table.
Declaration
public Task<int> InsertAsync(Action<ColumnMapper, T> columnMapper, Action<long? > outputIdentity, CancellationToken ct = default(CancellationToken))Parameters
| Type | Name | Description | 
|---|---|---|
| System.Action<ColumnMapper, T> | columnMapper | Provides Column mappings between value and column in this table. | 
| System.Action<System.Nullable<System.Int64>> | outputIdentity | Delegate to receive newly generated identity value. | 
| System.Threading.CancellationToken | ct | The async cancellation token. | 
Returns
| Type | Description | 
|---|---|
| System.Threading.Tasks.Task<System.Int32> | Number of records inserted into this database table. | 
InsertAsync<TSource>(DbSet<TSource>, CancellationToken)
Inserts into this database table from database recordset.
Declaration
public Task<int> InsertAsync<TSource>(DbSet<TSource> source, CancellationToken ct = default(CancellationToken))
    where TSource : class, T, new()Parameters
| Type | Name | Description | 
|---|---|---|
| DbSet<TSource> | source | The source database recordset. | 
| System.Threading.CancellationToken | ct | The async cancellation token. | 
Returns
| Type | Description | 
|---|---|
| System.Threading.Tasks.Task<System.Int32> | Number of records inserted into this database table. | 
Type Parameters
| Name | Description | 
|---|---|
| TSource | Entity type of database recordset. | 
InsertAsync<TSource>(DbSet<TSource>, Action<ColumnMapper, TSource, T>, CancellationToken)
Inserts into this database table from database recordset.
Declaration
public Task<int> InsertAsync<TSource>(DbSet<TSource> source, Action<ColumnMapper, TSource, T> columnMapper, CancellationToken ct = default(CancellationToken))
    where TSource : class, IEntity, new()Parameters
| Type | Name | Description | 
|---|---|---|
| DbSet<TSource> | source | The source database recordset. | 
| System.Action<ColumnMapper, TSource, T> | columnMapper | Provides column mappings between source database recordset and this table. | 
| System.Threading.CancellationToken | ct | The async cancellation token. | 
Returns
| Type | Description | 
|---|---|
| System.Threading.Tasks.Task<System.Int32> | Number of records inserted into this database table. | 
Type Parameters
| Name | Description | 
|---|---|
| TSource | Entity type of database recordset. | 
InsertAsync<TSource>(DataSet<TSource>, CancellationToken)
Inserts into this table from DataSet.
Declaration
public Task<int> InsertAsync<TSource>(DataSet<TSource> source, CancellationToken ct = default(CancellationToken))
    where TSource : class, T, new()Parameters
| Type | Name | Description | 
|---|---|---|
| DataSet<TSource> | source | The source DataSet. | 
| System.Threading.CancellationToken | ct | The async cancellation token. | 
Returns
| Type | Description | 
|---|---|
| System.Threading.Tasks.Task<System.Int32> | Number of records inserted into this database table. | 
Type Parameters
| Name | Description | 
|---|---|
| TSource | Entity type of source DataSet. | 
InsertAsync<TSource>(DataSet<TSource>, Boolean, CancellationToken)
Inserts into this table from DataSet.
Declaration
public Task<int> InsertAsync<TSource>(DataSet<TSource> source, bool updateIdentity, CancellationToken ct = default(CancellationToken))
    where TSource : class, T, new()Parameters
| Type | Name | Description | 
|---|---|---|
| DataSet<TSource> | source | The source DataSet. | 
| System.Boolean | updateIdentity | Specifies whether source DataSet identity column should be updated with newly generated values. | 
| System.Threading.CancellationToken | ct | The async cancellation token. | 
Returns
| Type | Description | 
|---|---|
| System.Threading.Tasks.Task<System.Int32> | Number of records inserted into this database table. | 
Type Parameters
| Name | Description | 
|---|---|
| TSource | Entity type of source DataSet. | 
InsertAsync<TSource>(DataSet<TSource>, Action<ColumnMapper, TSource, T>, CancellationToken)
Inserts into this table from DataSet.
Declaration
public Task<int> InsertAsync<TSource>(DataSet<TSource> source, Action<ColumnMapper, TSource, T> columnMapper, CancellationToken ct = default(CancellationToken))
    where TSource : class, IEntity, new()Parameters
| Type | Name | Description | 
|---|---|---|
| DataSet<TSource> | source | The source DataSet. | 
| System.Action<ColumnMapper, TSource, T> | columnMapper | Provides column mappings between source DataSet and this table. | 
| System.Threading.CancellationToken | ct | The async cancellation token. | 
Returns
| Type | Description | 
|---|---|
| System.Threading.Tasks.Task<System.Int32> | Number of records inserted into this database table. | 
Type Parameters
| Name | Description | 
|---|---|
| TSource | Entity type of source DataSet. | 
InsertAsync<TSource>(DataSet<TSource>, Action<ColumnMapper, TSource, T>, Boolean, CancellationToken)
Inserts into this table from DataSet.
Declaration
public Task<int> InsertAsync<TSource>(DataSet<TSource> source, Action<ColumnMapper, TSource, T> columnMapper, bool updateIdentity, CancellationToken ct = default(CancellationToken))
    where TSource : class, IEntity, new()Parameters
| Type | Name | Description | 
|---|---|---|
| DataSet<TSource> | source | The source DataSet. | 
| System.Action<ColumnMapper, TSource, T> | columnMapper | Provides column mappings between source DataSet and this table. | 
| System.Boolean | updateIdentity | Specifies whether source DataSet identity column should be updated with newly generated values. | 
| System.Threading.CancellationToken | ct | The async cancellation token. | 
Returns
| Type | Description | 
|---|---|
| System.Threading.Tasks.Task<System.Int32> | Number of records inserted into this database table. | 
Type Parameters
| Name | Description | 
|---|---|
| TSource | Entity type of source DataSet. | 
InsertAsync<TSource>(DataSet<TSource>, Int32, CancellationToken)
Inserts specified DataRow in DataSet into this table.
Declaration
public Task<int> InsertAsync<TSource>(DataSet<TSource> source, int ordinal, CancellationToken ct = default(CancellationToken))
    where TSource : class, T, new()Parameters
| Type | Name | Description | 
|---|---|---|
| DataSet<TSource> | source | The source DataSet. | 
| System.Int32 | ordinal | The ordianl to specify the source DataRow. | 
| System.Threading.CancellationToken | ct | The async cancellation token. | 
Returns
| Type | Description | 
|---|---|
| System.Threading.Tasks.Task<System.Int32> | Number of records inserted into this database table. | 
Type Parameters
| Name | Description | 
|---|---|
| TSource | Entity type of source DataSet. | 
InsertAsync<TSource>(DataSet<TSource>, Int32, Action<ColumnMapper, TSource, T>, CancellationToken)
Inserts specified DataRow in DataSet into this table.
Declaration
public Task<int> InsertAsync<TSource>(DataSet<TSource> source, int ordinal, Action<ColumnMapper, TSource, T> columnMapper, CancellationToken ct = default(CancellationToken))
    where TSource : class, IEntity, new()Parameters
| Type | Name | Description | 
|---|---|---|
| DataSet<TSource> | source | The source DataSet. | 
| System.Int32 | ordinal | The ordianl to specify the source DataRow. | 
| System.Action<ColumnMapper, TSource, T> | columnMapper | Provides column mappings between source DataSet and this table. | 
| System.Threading.CancellationToken | ct | The async cancellation token. | 
Returns
| Type | Description | 
|---|---|
| System.Threading.Tasks.Task<System.Int32> | Number of records inserted into this database table. | 
Type Parameters
| Name | Description | 
|---|---|
| TSource | Entity type of source DataSet. | 
InsertAsync<TSource>(DataSet<TSource>, Int32, Action<ColumnMapper, TSource, T>, Boolean, CancellationToken)
Inserts specified DataRow in DataSet into this table.
Declaration
public Task<int> InsertAsync<TSource>(DataSet<TSource> source, int ordinal, Action<ColumnMapper, TSource, T> columnMapper, bool updateIdentity, CancellationToken ct = default(CancellationToken))
    where TSource : class, IEntity, new()Parameters
| Type | Name | Description | 
|---|---|---|
| DataSet<TSource> | source | The source DataSet. | 
| System.Int32 | ordinal | The ordianl to specify the source DataRow. | 
| System.Action<ColumnMapper, TSource, T> | columnMapper | Provides column mappings between source DataSet and this table. | 
| System.Boolean | updateIdentity | Specifies whether source DataSet identity column should be updated with newly generated value. | 
| System.Threading.CancellationToken | ct | The async cancellation token. | 
Returns
| Type | Description | 
|---|---|
| System.Threading.Tasks.Task<System.Int32> | Number of records inserted into this database table. | 
Type Parameters
| Name | Description | 
|---|---|
| TSource | Entity type of source DataSet. |