Table of Contents

Method Push

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

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

Adds a value to the end of the named array element (see $push).

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

Parameters

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

The member expression.

value TValue

The value 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 enumerable member values.