Click or drag to resize

IChannelUpdateAsync Method

Executes an Update protocol.

Namespace:  MongoDB.Driver.Core.Bindings
Assembly:  MongoDB.Driver.Core (in MongoDB.Driver.Core.dll) Version: 2.12.2+a4a3888f4fb51bb518b1eb5002effc2d47f2ea6a
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.DriverCollectionNamespace
The collection namespace.
messageEncoderSettings
Type: MongoDB.Driver.Core.WireProtocol.Messages.EncodersMessageEncoderSettings
The message encoder settings.
writeConcern
Type: MongoDB.DriverWriteConcern
The write concern.
query
Type: MongoDB.BsonBsonDocument
The query.
update
Type: MongoDB.BsonBsonDocument
The update.
updateValidator
Type: MongoDB.Bson.IOIElementNameValidator
The update validator.
isMulti
Type: SystemBoolean
if set to true the Update can affect multiple documents.
isUpsert
Type: SystemBoolean
if set to true the document will be inserted if it is not found.
cancellationToken
Type: System.ThreadingCancellationToken
The cancellation token.

Return Value

Type: TaskWriteConcernResult
A Task whose result is the result of the Update protocol.
See Also