Class InMemoryBulkUpdateCommand
An in memory bulk update command.
Inheritance
System.Object
InMemoryBulkUpdateCommand
Implements
Inherited Members
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: Kephas.Data.InMemory.Commands
Assembly: Kephas.Data.dll
Syntax
[DataContextType(typeof(InMemoryDataContext))]
public class InMemoryBulkUpdateCommand : BulkUpdateCommand, ILoggable, IBulkUpdateCommand, IDataCommand<IBulkUpdateContext, IBulkDataOperationResult>, IDataCommand, IAsyncOperation
Methods
| Improve this Doc View SourceBulkUpdateCoreAsync<T>(IBulkUpdateContext, Expression<Func<T, Boolean>>, IDictionary<String, Object>, CancellationToken)
Updates the entities matching the provided criteria and returns the number of affected entities.
Declaration
protected override Task<long> BulkUpdateCoreAsync<T>(IBulkUpdateContext bulkDeleteContext, Expression<Func<T, bool>> criteria, IDictionary<string, object> values, CancellationToken cancellationToken)
where T : class
Parameters
Type | Name | Description |
---|---|---|
IBulkUpdateContext | bulkDeleteContext | The bulk delete context. |
System.Linq.Expressions.Expression<System.Func<T, System.Boolean>> | criteria | The criteria for finding the entities to operate on. |
System.Collections.Generic.IDictionary<System.String, System.Object> | values | The values. |
System.Threading.CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Int64> | A promise of the number of updated entities. |
Type Parameters
Name | Description |
---|---|
T | The type of the entity. |
Overrides
Kephas.Data.Commands.BulkUpdateCommand.BulkUpdateCoreAsync<T>(Kephas.Data.Commands.IBulkUpdateContext, System.Linq.Expressions.Expression<System.Func<T, System.Boolean>>, System.Collections.Generic.IDictionary<System.String, System.Object>, System.Threading.CancellationToken)
|
Improve this Doc
View Source
GetBulkOperationResult<T>(IBulkUpdateContext, Int64, Int64, Expression<Func<T, Boolean>>)
Gets the bulk operation result based on the affected entities.
Declaration
protected override IBulkDataOperationResult GetBulkOperationResult<T>(IBulkUpdateContext bulkOperationContext, long count, long localCacheCount, Expression<Func<T, bool>> criteria)
where T : class
Parameters
Type | Name | Description |
---|---|---|
IBulkUpdateContext | bulkOperationContext | The bulk operation context. |
System.Int64 | count | The number of affected entities. |
System.Int64 | localCacheCount | Number of affected entities in the local caches. |
System.Linq.Expressions.Expression<System.Func<T, System.Boolean>> | criteria | The criteria for matching entities. |
Returns
Type | Description |
---|---|
IBulkDataOperationResult | The bulk operation result. |
Type Parameters
Name | Description |
---|---|
T | The entity type. |
Overrides
Kephas.Data.Commands.BulkOperationCommandBase<Kephas.Data.Commands.IBulkUpdateContext, Kephas.Data.Commands.IBulkDataOperationResult>.GetBulkOperationResult<T>(Kephas.Data.Commands.IBulkUpdateContext, System.Int64, System.Int64, System.Linq.Expressions.Expression<System.Func<T, System.Boolean>>)
Exceptions
Type | Condition |
---|---|
NotFoundDataException | Thrown when a Not Found Data error condition occurs. |