Table of Contents

Class FindOneAndReplaceOperation<TResult>

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

Represents a find one and replace operation.

public class FindOneAndReplaceOperation<TResult> : FindAndModifyOperationBase<TResult>, IWriteOperation<TResult>, IRetryableWriteOperation<TResult>, IExecutableInRetryableWriteContext<TResult>

Type Parameters

TResult

The type of the result.

Inheritance
FindOneAndReplaceOperation<TResult>
Implements
Inherited Members
Extension Methods

Constructors

FindOneAndReplaceOperation(CollectionNamespace, BsonDocument, BsonDocument, IBsonSerializer<TResult>, MessageEncoderSettings)

Initializes a new instance of the FindOneAndReplaceOperation<TResult> class.

Properties

BypassDocumentValidation

Gets or sets a value indicating whether to bypass document validation.

Filter

Gets the filter.

Hint

Gets or sets the hint.

IsUpsert

Gets a value indicating whether a document should be inserted if no matching document is found.

Let

Gets or sets the let document.

MaxTime

Gets or sets the maximum time the server should spend on this operation.

Projection

Gets or sets the projection.

Replacement

Gets the replacement document.

ReturnDocument

Gets or sets which version of the modified document to return.

Sort

Gets or sets the sort specification.

Methods

GetCommandValidator()

Gets the command validator.