Table of Contents

Method Pull

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

Pull<TDocument, TItem>(UpdateDefinition<TDocument>, FieldDefinition<TDocument>, TItem)

Combines an existing update with a pull operator.

public static UpdateDefinition<TDocument> Pull<TDocument, TItem>(this UpdateDefinition<TDocument> update, FieldDefinition<TDocument> field, TItem value)

Parameters

update UpdateDefinition<TDocument>

The update.

field FieldDefinition<TDocument>

The field.

value TItem

The value.

Returns

UpdateDefinition<TDocument>

A combined update.

Type Parameters

TDocument

The type of the document.

TItem

The type of the item.

Pull<TDocument, TItem>(UpdateDefinition<TDocument>, Expression<Func<TDocument, IEnumerable<TItem>>>, TItem)

Combines an existing update with a pull operator.

public static UpdateDefinition<TDocument> Pull<TDocument, TItem>(this UpdateDefinition<TDocument> update, Expression<Func<TDocument, IEnumerable<TItem>>> field, TItem value)

Parameters

update UpdateDefinition<TDocument>

The update.

field Expression<Func<TDocument, IEnumerable<TItem>>>

The field.

value TItem

The value.

Returns

UpdateDefinition<TDocument>

A combined update.

Type Parameters

TDocument

The type of the document.

TItem

The type of the item.