Table of Contents

Method Push

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

Push<TItem>(FieldDefinition<TDocument>, TItem)

Creates a push operator.

public UpdateDefinition<TDocument> Push<TItem>(FieldDefinition<TDocument> field, TItem value)

Parameters

field FieldDefinition<TDocument>

The field.

value TItem

The value.

Returns

UpdateDefinition<TDocument>

A push operator.

Type Parameters

TItem

The type of the item.

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

Creates a push operator.

public UpdateDefinition<TDocument> Push<TItem>(Expression<Func<TDocument, IEnumerable<TItem>>> field, TItem value)

Parameters

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

The field.

value TItem

The value.

Returns

UpdateDefinition<TDocument>

A push operator.

Type Parameters

TItem

The type of the item.