Click or drag to resize
IMongoCollection<TDocument>.DeleteManyAsync Method (FilterDefinition<TDocument>, DeleteOptions, CancellationToken)
Deletes multiple documents.

Namespace: MongoDB.Driver
Assembly: MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.4.1
Syntax
Task<DeleteResult> DeleteManyAsync(
	FilterDefinition<TDocument> filter,
	DeleteOptions options,
	CancellationToken cancellationToken = null
)

Parameters

filter
Type: MongoDB.Driver.FilterDefinition<TDocument>
The filter.
options
Type: MongoDB.Driver.DeleteOptions
The options.
cancellationToken (Optional)
Type: System.Threading.CancellationToken
The cancellation token.

Return Value

Type: Task<DeleteResult>
The result of the delete operation.
See Also