Table of Contents

Class UpdateOneModel<TDocument>

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

Model for updating a single document.

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

Type Parameters

TDocument

The type of the document.

Inheritance
WriteModel<TDocument>
UpdateOneModel<TDocument>
Inherited Members

Constructors

UpdateOneModel(FilterDefinition<TDocument>, UpdateDefinition<TDocument>)

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

Properties

ArrayFilters

Gets or sets the array filters.

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.

Sort

Gets or sets the sort definition.

Update

Gets the update.

Methods

ThrowIfNotValid()

Validate model.