Click or drag to resize

MongoCollectionBase<TDocument>.UpdateMany Method (FilterDefinition<TDocument>, UpdateDefinition<TDocument>, UpdateOptions, CancellationToken)

Updates many documents.

Namespace:  MongoDB.Driver
Assembly:  MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.8.0+cc573f3e1f48f39162b4b680e921a623e127e8fa
Syntax
public virtual UpdateResult UpdateMany(
	FilterDefinition<TDocument> filter,
	UpdateDefinition<TDocument> update,
	UpdateOptions options = null,
	CancellationToken cancellationToken = null
)

Parameters

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

Return Value

Type: UpdateResult
The result of the update operation.

Implements

IMongoCollection<TDocument>.UpdateMany(FilterDefinition<TDocument>, UpdateDefinition<TDocument>, UpdateOptions, CancellationToken)
See Also