Table of Contents

Method PushEach

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

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

Adds a list of values to the end of the named array element (see $push and $each).

public static UpdateBuilder<TDocument> PushEach<TValue>(Expression<Func<TDocument, IEnumerable<TValue>>> memberExpression, IEnumerable<TValue> values)

Parameters

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

The member expression.

values IEnumerable<TValue>

The values to add to the end of the array.

Returns

UpdateBuilder<TDocument>

The builder (so method calls can be chained).

Type Parameters

TValue

The type of the value.

PushEach<TValue>(Expression<Func<TDocument, IEnumerable<TValue>>>, PushEachOptions, IEnumerable<TValue>)

Adds a list of values to the end of the named array element (see $push and $each).

public static UpdateBuilder<TDocument> PushEach<TValue>(Expression<Func<TDocument, IEnumerable<TValue>>> memberExpression, PushEachOptions options, IEnumerable<TValue> values)

Parameters

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

The member expression.

options PushEachOptions

The options.

values IEnumerable<TValue>

The values to add to the end of the array.

Returns

UpdateBuilder<TDocument>

The builder (so method calls can be chained).

Type Parameters

TValue

The type of the value.

PushEach<TValue>(Expression<Func<TDocument, IEnumerable<TValue>>>, Action<PushEachOptionsBuilder<TValue>>, IEnumerable<TValue>)

Adds a list of values to the end of the named array element (see $push and $each).

public static UpdateBuilder<TDocument> PushEach<TValue>(Expression<Func<TDocument, IEnumerable<TValue>>> memberExpression, Action<PushEachOptionsBuilder<TValue>> options, IEnumerable<TValue> values)

Parameters

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

The member expression.

options Action<PushEachOptionsBuilder<TValue>>

The options.

values IEnumerable<TValue>

The values to add to the end of the array.

Returns

UpdateBuilder<TDocument>

The builder (so method calls can be chained).

Type Parameters

TValue

The type of the value.