Table of Contents

Method PopFirst

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

PopFirst<TDocument>(UpdateDefinition<TDocument>, FieldDefinition<TDocument>)

Combines an existing update with a pop operator.

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

Parameters

update UpdateDefinition<TDocument>

The update.

field FieldDefinition<TDocument>

The field.

Returns

UpdateDefinition<TDocument>

A combined update.

Type Parameters

TDocument

The type of the document.

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

Combines an existing update with a pop operator.

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

Parameters

update UpdateDefinition<TDocument>

The update.

field Expression<Func<TDocument, object>>

The field.

Returns

UpdateDefinition<TDocument>

A combined update.

Type Parameters

TDocument

The type of the document.