Method UpdateAsync
| Improve this Doc View SourceUpdateAsync(Action<ColumnMapper, T>, CancellationToken)
Updates all records with specified values.
Declaration
public Task<int> UpdateAsync(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 rows updated. |
UpdateAsync(Action<ColumnMapper, T>, Func<T, _Boolean>, CancellationToken)
Updates subset of records with specified values.
Declaration
public Task<int> UpdateAsync(Action<ColumnMapper, T> columnMapper, Func<T, _Boolean> where, CancellationToken ct = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Action<ColumnMapper, T> | columnMapper | Provides column mappings between value and column in this table. |
System.Func<T, _Boolean> | where | The condition to filter the records. |
System.Threading.CancellationToken | ct | The async cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Int32> | Number of rows updated. |
UpdateAsync<TSource>(DbSet<TSource>, CancellationToken)
Updates records from matching database recordset.
Declaration
public Task<int> UpdateAsync<TSource>(DbSet<TSource> source, CancellationToken ct = default(CancellationToken))
where TSource : class, T, new()
Parameters
Type | Name | Description |
---|---|---|
DbSet<TSource> | source | The source matching database recordset. |
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 database recordset. |
UpdateAsync<TSource>(DbSet<TSource>, Action<ColumnMapper, T>, Func<TSource, T, KeyMapping>, CancellationToken)
Updates records from matching database recordset.
Declaration
public Task<int> UpdateAsync<TSource>(DbSet<TSource> source, Action<ColumnMapper, T> columnMapper, Func<TSource, T, KeyMapping> keyMapper, CancellationToken ct = default(CancellationToken))
where TSource : class, IEntity, new()
Parameters
Type | Name | Description |
---|---|---|
DbSet<TSource> | source | The source matching database recordset. |
System.Action<ColumnMapper, T> | columnMapper | Provides column mappings between source database recordset and this table. |
System.Func<TSource, T, KeyMapping> | keyMapper | Provides key mapping 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 rows updated. |
Type Parameters
Name | Description |
---|---|
TSource | Entity type of source database recordset. |
UpdateAsync<TSource>(DbSet<TSource>, Action<ColumnMapper, TSource, T>, Func<TSource, T, KeyMapping>, CancellationToken)
Updates records from matching database recordset.
Declaration
public Task<int> UpdateAsync<TSource>(DbSet<TSource> source, Action<ColumnMapper, TSource, T> columnMapper, Func<TSource, T, KeyMapping> keyMapper, CancellationToken ct = default(CancellationToken))
where TSource : class, IEntity, new()
Parameters
Type | Name | Description |
---|---|---|
DbSet<TSource> | source | The source matching database recordset. |
System.Action<ColumnMapper, TSource, T> | columnMapper | Provides column mappings between source database recordset and this table. |
System.Func<TSource, T, KeyMapping> | keyMapper | Provides key mapping 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 rows updated. |
Type Parameters
Name | Description |
---|---|
TSource | Entity type of source database recordset. |
UpdateAsync<TSource>(DataSet<TSource>, Int32, CancellationToken)
Updates from matching row in DataSet.
Declaration
public Task<int> UpdateAsync<TSource>(DataSet<TSource> source, int rowIndex, CancellationToken ct = default(CancellationToken))
where TSource : class, T, new()
Parameters
Type | Name | Description |
---|---|---|
DataSet<TSource> | source | The source DataSet. |
System.Int32 | rowIndex | The row index in DataSet. |
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. |
UpdateAsync<TSource>(DataSet<TSource>, Int32, Action<ColumnMapper, TSource, T>, Func<TSource, T, KeyMapping>, CancellationToken)
Updates from matching row in DataSet.
Declaration
public Task<int> UpdateAsync<TSource>(DataSet<TSource> source, int rowIndex, Action<ColumnMapper, TSource, T> columnMapper, Func<TSource, T, KeyMapping> keyMapper, CancellationToken ct = default(CancellationToken))
where TSource : class, IEntity, new()
Parameters
Type | Name | Description |
---|---|---|
DataSet<TSource> | source | The source DataSet. |
System.Int32 | rowIndex | The row index in DataSet. |
System.Action<ColumnMapper, TSource, T> | columnMapper | Provides column mappings between source DataSet and this table. |
System.Func<TSource, T, KeyMapping> | keyMapper | Provides key mapping 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 rows updated. |
Type Parameters
Name | Description |
---|---|
TSource | Entity type of source DataSet. |
UpdateAsync<TSource>(DataSet<TSource>, CancellationToken)
Updates records in this table from matching DataSet.
Declaration
public Task<int> UpdateAsync<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 rows updated. |
Type Parameters
Name | Description |
---|---|
TSource | Entity type of source DataSet. |
UpdateAsync<TSource>(DataSet<TSource>, Action<ColumnMapper, TSource, T>, CancellationToken)
Updates records in this table from matching DataSet.
Declaration
public Task<int> UpdateAsync<TSource>(DataSet<TSource> source, Action<ColumnMapper, TSource, T> columnMapper, CancellationToken ct = default(CancellationToken))
where TSource : class, T, 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 rows updated. |
Type Parameters
Name | Description |
---|---|
TSource | Entity type of source DataSet. |
UpdateAsync<TSource>(DataSet<TSource>, Action<ColumnMapper, TSource, T>, Func<TSource, T, KeyMapping>, CancellationToken)
Updates records in this table from matching DataSet.
Declaration
public Task<int> UpdateAsync<TSource>(DataSet<TSource> source, Action<ColumnMapper, TSource, T> columnMapper, Func<TSource, T, KeyMapping> keyMapper, 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.Func<TSource, T, KeyMapping> | keyMapper | Provides key mapping 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 rows updated. |
Type Parameters
Name | Description |
---|---|
TSource | Entity type of source DataSet. |