MongoCollectionBaseTDocumentUpdateMany Method (IClientSessionHandle, FilterDefinitionTDocument, UpdateDefinitionTDocument, UpdateOptions, CancellationToken) |
Updates many documents.
Namespace:
MongoDB.Driver
Assembly:
MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.22.0+75246110ed1247226fcc7f8eb2c54ffab745693e
Syntax public virtual UpdateResult UpdateMany(
IClientSessionHandle session,
FilterDefinition<TDocument> filter,
UpdateDefinition<TDocument> update,
UpdateOptions options = null,
CancellationToken cancellationToken = default
)
Public Overridable Function UpdateMany (
session As IClientSessionHandle,
filter As FilterDefinition(Of TDocument),
update As UpdateDefinition(Of TDocument),
Optional options As UpdateOptions = Nothing,
Optional cancellationToken As CancellationToken = Nothing
) As UpdateResult
abstract UpdateMany :
session : IClientSessionHandle *
filter : FilterDefinition<'TDocument> *
update : UpdateDefinition<'TDocument> *
?options : UpdateOptions *
?cancellationToken : CancellationToken
(* Defaults:
let _options = defaultArg options null
let _cancellationToken = defaultArg cancellationToken new CancellationToken()
*)
-> UpdateResult
override UpdateMany :
session : IClientSessionHandle *
filter : FilterDefinition<'TDocument> *
update : UpdateDefinition<'TDocument> *
?options : UpdateOptions *
?cancellationToken : CancellationToken
(* Defaults:
let _options = defaultArg options null
let _cancellationToken = defaultArg cancellationToken new CancellationToken()
*)
-> UpdateResult
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:
UpdateResult
The result of the update operation.
Implements
IMongoCollectionTDocumentUpdateMany(IClientSessionHandle, FilterDefinitionTDocument, UpdateDefinitionTDocument, UpdateOptions, CancellationToken)See Also