Method AddToSetEach
AddToSetEach<TDocument, TItem>(UpdateDefinition<TDocument>, FieldDefinition<TDocument>, IEnumerable<TItem>)
Combines an existing update with an add to set operator.
public static UpdateDefinition<TDocument> AddToSetEach<TDocument, TItem>(this UpdateDefinition<TDocument> update, FieldDefinition<TDocument> field, IEnumerable<TItem> values)
Parameters
update
UpdateDefinition<TDocument>The update.
field
FieldDefinition<TDocument>The field.
values
IEnumerable<TItem>The values.
Returns
- UpdateDefinition<TDocument>
A combined update.
Type Parameters
TDocument
The type of the document.
TItem
The type of the item.
AddToSetEach<TDocument, TItem>(UpdateDefinition<TDocument>, Expression<Func<TDocument, IEnumerable<TItem>>>, IEnumerable<TItem>)
Combines an existing update with an add to set operator.
public static UpdateDefinition<TDocument> AddToSetEach<TDocument, TItem>(this UpdateDefinition<TDocument> update, Expression<Func<TDocument, IEnumerable<TItem>>> field, IEnumerable<TItem> values)
Parameters
update
UpdateDefinition<TDocument>The update.
field
Expression<Func<TDocument, IEnumerable<TItem>>>The field.
values
IEnumerable<TItem>The values.
Returns
- UpdateDefinition<TDocument>
A combined update.
Type Parameters
TDocument
The type of the document.
TItem
The type of the item.