Table of Contents

Class FindAndModifyResult

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.Legacy.dll

Represents the result of a FindAndModify command.

[Serializable]
[BsonSerializer(typeof(CommandResultSerializer<FindAndModifyResult>))]
public class FindAndModifyResult : CommandResult
Inheritance
FindAndModifyResult
Inherited Members
Extension Methods

Constructors

FindAndModifyResult(BsonDocument)

Initializes a new instance of the FindAndModifyResult class.

public FindAndModifyResult(BsonDocument response)

Parameters

response BsonDocument

The response.

Properties

ModifiedDocument

Gets the modified document.

public BsonDocument ModifiedDocument { get; }

Property Value

BsonDocument

Methods

GetModifiedDocumentAs(Type)

Gets the modified document as a TDocument.

public object GetModifiedDocumentAs(Type documentType)

Parameters

documentType Type

The nominal type of the modified document.

Returns

object

The modified document.

GetModifiedDocumentAs<TDocument>()

Gets the modified document as a TDocument.

public TDocument GetModifiedDocumentAs<TDocument>()

Returns

TDocument

The modified document.

Type Parameters

TDocument

The nominal type of the modified document.