Click or drag to resize

IChannel.UpdateAsync Method

Executes an Update protocol.

Namespace:  MongoDB.Driver.Core.Bindings
Assembly:  MongoDB.Driver.Core (in MongoDB.Driver.Core.dll) Version: 2.5.0+57.Branch.master.Sha.6a4e00a2d91090c65a9b11364b9ebfdb9c7da076
Syntax
Task<WriteConcernResult> UpdateAsync(
	CollectionNamespace collectionNamespace,
	MessageEncoderSettings messageEncoderSettings,
	WriteConcern writeConcern,
	BsonDocument query,
	BsonDocument update,
	IElementNameValidator updateValidator,
	bool isMulti,
	bool isUpsert,
	CancellationToken cancellationToken
)

Parameters

collectionNamespace
Type: MongoDB.Driver.CollectionNamespace
The collection namespace.
messageEncoderSettings
Type: MongoDB.Driver.Core.WireProtocol.Messages.Encoders.MessageEncoderSettings
The message encoder settings.
writeConcern
Type: MongoDB.Driver.WriteConcern
The write concern.
query
Type: MongoDB.Bson.BsonDocument
The query.
update
Type: MongoDB.Bson.BsonDocument
The update.
updateValidator
Type: MongoDB.Bson.IO.IElementNameValidator
The update validator.
isMulti
Type: System.Boolean
if set to true the Update can affect multiple documents.
isUpsert
Type: System.Boolean
if set to true the document will be inserted if it is not found.
cancellationToken
Type: System.Threading.CancellationToken
The cancellation token.

Return Value

Type: Task<WriteConcernResult>
A Task whose result is the result of the Update protocol.
See Also