Click or drag to resize

MongoCollectionBaseTDocumentUpdateManyAsync Method (IClientSessionHandle, FilterDefinitionTDocument, UpdateDefinitionTDocument, UpdateOptions, CancellationToken)

Updates many documents.

Namespace:  MongoDB.Driver
Assembly:  MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.10.0+569905ff5e778c38ea19d9d0392496a83e1704ed
Syntax
public virtual Task<UpdateResult> UpdateManyAsync(
	IClientSessionHandle session,
	FilterDefinition<TDocument> filter,
	UpdateDefinition<TDocument> update,
	UpdateOptions options = null,
	CancellationToken cancellationToken = null
)

Parameters

session
Type: MongoDB.DriverIClientSessionHandle
The session.
filter
Type: MongoDB.DriverFilterDefinitionTDocument
The filter.
update
Type: MongoDB.DriverUpdateDefinitionTDocument
The update.
options (Optional)
Type: MongoDB.DriverUpdateOptions
The options.
cancellationToken (Optional)
Type: System.ThreadingCancellationToken
The cancellation token.

Return Value

Type: TaskUpdateResult
The result of the update operation.

Implements

IMongoCollectionTDocumentUpdateManyAsync(IClientSessionHandle, FilterDefinitionTDocument, UpdateDefinitionTDocument, UpdateOptions, CancellationToken)
See Also