Class BulkDeleteCommand
Base class for bulk delete commands.
Inheritance
System.Object
BulkDeleteCommand
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.Commands
Assembly: Kephas.Data.dll
Syntax
[DataContextType(typeof(DataContextBase))]
public class BulkDeleteCommand : BulkOperationCommandBase<IBulkDeleteContext, IBulkDataOperationResult>, ILoggable, IBulkDeleteCommand, IDataCommand<IBulkDeleteContext, IBulkDataOperationResult>, IDataCommand, IAsyncOperation
Methods
| Improve this Doc View SourceBulkDeleteAsync<T>(IBulkDeleteContext, CancellationToken)
Deletes the entities matching the provided criteria and returns the number of affected entities.
Declaration
protected virtual Task<IBulkDataOperationResult> BulkDeleteAsync<T>(IBulkDeleteContext bulkDeleteContext, CancellationToken cancellationToken)
where T : class
Parameters
Type | Name | Description |
---|---|---|
IBulkDeleteContext | bulkDeleteContext | The bulk delete context. |
System.Threading.CancellationToken | cancellationToken | Optional. The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<IBulkDataOperationResult> | A promise of the number of deleted entities. |
Type Parameters
Name | Description |
---|---|
T | The type of the entity. |
BulkDeleteCoreAsync<T>(IBulkDeleteContext, Expression<Func<T, Boolean>>, CancellationToken)
Deletes the entities matching the provided criteria and returns the number of affected entities.
Declaration
protected virtual Task<long> BulkDeleteCoreAsync<T>(IBulkDeleteContext bulkDeleteContext, Expression<Func<T, bool>> criteria, CancellationToken cancellationToken)
where T : class
Parameters
Type | Name | Description |
---|---|---|
IBulkDeleteContext | 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.Threading.CancellationToken | cancellationToken | Optional. The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Int64> | A promise of the number of deleted entities. |
Type Parameters
Name | Description |
---|---|
T | The type of the entity. |
ExecuteAsync(IBulkDeleteContext, CancellationToken)
Executes the data command asynchronously.
Declaration
public override Task<IBulkDataOperationResult> ExecuteAsync(IBulkDeleteContext operationContext, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IBulkDeleteContext | operationContext | The operation context. |
System.Threading.CancellationToken | cancellationToken | Optional. The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<IBulkDataOperationResult> | A promise of a IBulkDataOperationResult. |
Overrides
Kephas.Data.Commands.DataCommandBase<Kephas.Data.Commands.IBulkDeleteContext, Kephas.Data.Commands.IBulkDataOperationResult>.ExecuteAsync(Kephas.Data.Commands.IBulkDeleteContext, System.Threading.CancellationToken)