Table of Contents

Method Pull

Namespace
MongoDB.Driver.Builders
Assembly
MongoDB.Driver.Legacy.dll

Pull<TValue>(Expression<Func<TDocument, IEnumerable<TValue>>>, TValue)

Removes all values from the named array element that are equal to some value (see $pull).

public UpdateBuilder<TDocument> Pull<TValue>(Expression<Func<TDocument, IEnumerable<TValue>>> memberExpression, TValue value)

Parameters

memberExpression Expression<Func<TDocument, IEnumerable<TValue>>>

The member expression.

value TValue

The value to remove.

Returns

UpdateBuilder<TDocument>

The builder (so method calls can be chained).

Type Parameters

TValue

The type of the enumerable member values.

Pull<TValue>(Expression<Func<TDocument, IEnumerable<TValue>>>, Func<QueryBuilder<TValue>, IMongoQuery>)

Removes all values from the named array element that match some query (see $pull).

public UpdateBuilder<TDocument> Pull<TValue>(Expression<Func<TDocument, IEnumerable<TValue>>> memberExpression, Func<QueryBuilder<TValue>, IMongoQuery> elementQueryBuilderFunction)

Parameters

memberExpression Expression<Func<TDocument, IEnumerable<TValue>>>

The member expression.

elementQueryBuilderFunction Func<QueryBuilder<TValue>, IMongoQuery>

A function that builds a query using the supplied query builder.

Returns

UpdateBuilder<TDocument>

The builder (so method calls can be chained).

Type Parameters

TValue

The type of the enumerable member values.