Table of Contents

Class WriteConcernResult

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.Core.dll

Represents the results of an operation performed with an acknowledged WriteConcern.

[Serializable]
public class WriteConcernResult
Inheritance
WriteConcernResult
Inherited Members

Constructors

WriteConcernResult(BsonDocument)

Initializes a new instance of the WriteConcernResult class.

public WriteConcernResult(BsonDocument response)

Parameters

response BsonDocument

The response.

Properties

DocumentsAffected

Gets the number of documents affected.

public long DocumentsAffected { get; }

Property Value

long

HasLastErrorMessage

Gets whether the result has a LastErrorMessage.

public bool HasLastErrorMessage { get; }

Property Value

bool

LastErrorMessage

Gets the last error message (null if none).

public string LastErrorMessage { get; }

Property Value

string

Response

Gets the wrapped result.

public BsonDocument Response { get; }

Property Value

BsonDocument

UpdatedExisting

Gets whether the last command updated an existing document.

public bool UpdatedExisting { get; }

Property Value

bool

Upserted

Gets the _id of an upsert that resulted in an insert.

public BsonValue Upserted { get; }

Property Value

BsonValue