Click or drag to resize
UpdateDefinitionBuilder<TDocument>.AddToSetEach<TItem> Method (FieldDefinition<TDocument>, IEnumerable<TItem>)
Creates an add to set operator.

Namespace: MongoDB.Driver
Assembly: MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.4.1
Syntax
public UpdateDefinition<TDocument> AddToSetEach<TItem>(
	FieldDefinition<TDocument> field,
	IEnumerable<TItem> values
)

Parameters

field
Type: MongoDB.Driver.FieldDefinition<TDocument>
The field.
values
Type: System.Collections.Generic.IEnumerable<TItem>
The values.

Type Parameters

TItem
The type of the item.

Return Value

Type: UpdateDefinition<TDocument>
An add to set operator.
See Also