Method UpdateAsync
| Improve this Doc View SourceUpdateAsync<TSource, TTarget>(DataSet<TSource>, DbTable<TTarget>, Action<ColumnMapper, TSource, TTarget>, CandidateKey, CancellationToken)
Executes query to update database table from DataSet.
Declaration
protected abstract Task<int> UpdateAsync<TSource, TTarget>(DataSet<TSource> source, DbTable<TTarget> target, Action<ColumnMapper, TSource, TTarget> columnMapper, CandidateKey targetKey, CancellationToken ct)
where TSource : class, IEntity, new()
where TTarget : class, IEntity, new()
Parameters
| Type | Name | Description |
|---|---|---|
| DataSet<TSource> | source | The source DataSet. |
| DbTable<TTarget> | target | The target database table. |
| System.Action<ColumnMapper, TSource, TTarget> | columnMapper | Provides column mappings between source DataSet and target database table. |
| CandidateKey | targetKey | The key of target database table. |
| System.Threading.CancellationToken | ct | The async cancellation token. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.Int32> | Number of rows updated. |
Type Parameters
| Name | Description |
|---|---|
| TSource | Entity type of source DataSet. |
| TTarget | Entity type of target database table. |