Class MongoBulkDeleteCommand
A MongoDB bulk delete command.
Inheritance
System.Object
MongoBulkDeleteCommand
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.MongoDB.Commands
Assembly: Kephas.Data.MongoDB.dll
Syntax
[DataContextType(typeof(MongoDataContext))]
public class MongoBulkDeleteCommand : BulkDeleteCommand, ILoggable, IBulkDeleteCommand, IDataCommand<IBulkDeleteContext, IBulkDataOperationResult>, IDataCommand, IAsyncOperation
Methods
| Improve this Doc View SourceBulkDeleteCoreAsync<T>(IBulkDeleteContext, Expression<Func<T, Boolean>>, CancellationToken)
Deletes the entities matching the provided criteria and returns the number of affected entities.
Declaration
protected override 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 | 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. |
Overrides
Kephas.Data.Commands.BulkDeleteCommand.BulkDeleteCoreAsync<T>(Kephas.Data.Commands.IBulkDeleteContext, System.Linq.Expressions.Expression<System.Func<T, System.Boolean>>, System.Threading.CancellationToken)