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 UpdateBuilder<TDocument> PushEach<TValue>(Expression<Func<TDocument, IEnumerable<TValue>>> memberExpression, IEnumerable<TValue> values)

Parameters

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

The name of the array element.

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 UpdateBuilder<TDocument> PushEach<TValue>(Expression<Func<TDocument, IEnumerable<TValue>>> memberExpression, PushEachOptions options, IEnumerable<TValue> values)

Parameters

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

The name of the array element.

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 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 name of the array element.

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.