Method DeleteManyAsync
DeleteManyAsync(FilterDefinition<TDocument>, CancellationToken)
Deletes multiple documents.
public virtual Task<DeleteResult> DeleteManyAsync(FilterDefinition<TDocument> filter, CancellationToken cancellationToken = default)
Parameters
filter
FilterDefinition <TDocument>The filter.
cancellationToken
CancellationToken The cancellation token.
Returns
- Task<Delete
Result > The result of the delete operation.
DeleteManyAsync(FilterDefinition<TDocument>, DeleteOptions, CancellationToken)
Deletes multiple documents.
public virtual Task<DeleteResult> DeleteManyAsync(FilterDefinition<TDocument> filter, DeleteOptions options, CancellationToken cancellationToken = default)
Parameters
filter
FilterDefinition <TDocument>The filter.
options
DeleteOptions The options.
cancellationToken
CancellationToken The cancellation token.
Returns
- Task<Delete
Result > The result of the delete operation.
DeleteManyAsync(IClientSessionHandle, FilterDefinition<TDocument>, DeleteOptions, CancellationToken)
Deletes multiple documents.
public virtual Task<DeleteResult> DeleteManyAsync(IClientSessionHandle session, FilterDefinition<TDocument> filter, DeleteOptions options = null, CancellationToken cancellationToken = default)
Parameters
session
IClientSession Handle The session.
filter
FilterDefinition <TDocument>The filter.
options
DeleteOptions The options.
cancellationToken
CancellationToken The cancellation token.
Returns
- Task<Delete
Result > The result of the delete operation.