Table of Contents

Class ReplaceOneModel<TDocument>

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

Model for replacing a single document.

public sealed class ReplaceOneModel<TDocument> : WriteModel<TDocument>

Type Parameters

TDocument

The type of the document.

Inheritance
WriteModel<TDocument>
ReplaceOneModel<TDocument>
Inherited Members

Constructors

ReplaceOneModel(FilterDefinition<TDocument>, TDocument)

Initializes a new instance of the ReplaceOneModel<TDocument> class.

Properties

Collation

Gets or sets the collation.

Filter

Gets the filter.

Hint

Gets or sets the hint.

IsUpsert

Gets or sets a value indicating whether to insert the document if it doesn't already exist.

ModelType

Gets the type of the model.

Replacement

Gets the replacement.