Method PopLast

| MongoDB CSharp Driver API Reference (original) (raw)

Namespace

MongoDB.Driver

Assembly

MongoDB.Driver.dll

PopLast(UpdateDefinition, FieldDefinition)

Combines an existing update with a pop operator.

public static UpdateDefinition<TDocument> PopLast<TDocument>(this UpdateDefinition<TDocument> update, FieldDefinition<TDocument> field)

Parameters

update UpdateDefinition

The update.

field FieldDefinition

The field.

Returns

UpdateDefinition

A combined update.

Type Parameters

TDocument

The type of the document.

PopLast(UpdateDefinition, Expression<Func<TDocument, object>>)

Combines an existing update with a pop operator.

public static UpdateDefinition<TDocument> PopLast<TDocument>(this UpdateDefinition<TDocument> update, Expression<Func<TDocument, object>> field)

Parameters

update UpdateDefinition

The update.

field Expression<Func<TDocument, object>>

The field.

Returns

UpdateDefinition

A combined update.

Type Parameters

TDocument

The type of the document.