Executes an Update protocol.
Namespace:
MongoDB.Driver.Core.Bindings
Assembly:
MongoDB.Driver.Core (in MongoDB.Driver.Core.dll) Version: 2.7.3+Branch.v2.7.x.Sha.2f1f2be13a23b8520cb9c2ee8439c022f9a03efe
Syntax WriteConcernResult Update(
CollectionNamespace collectionNamespace,
MessageEncoderSettings messageEncoderSettings,
WriteConcern writeConcern,
BsonDocument query,
BsonDocument update,
IElementNameValidator updateValidator,
bool isMulti,
bool isUpsert,
CancellationToken cancellationToken
)
Function Update (
collectionNamespace As CollectionNamespace,
messageEncoderSettings As MessageEncoderSettings,
writeConcern As WriteConcern,
query As BsonDocument,
update As BsonDocument,
updateValidator As IElementNameValidator,
isMulti As Boolean,
isUpsert As Boolean,
cancellationToken As CancellationToken
) As WriteConcernResult
abstract Update :
collectionNamespace : CollectionNamespace *
messageEncoderSettings : MessageEncoderSettings *
writeConcern : WriteConcern *
query : BsonDocument *
update : BsonDocument *
updateValidator : IElementNameValidator *
isMulti : bool *
isUpsert : bool *
cancellationToken : CancellationToken -> WriteConcernResult
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:
WriteConcernResultThe result of the Update protocol.
See Also