Method AddToSet
AddToSet<TItem>(FieldDefinition<TDocument>, TItem)
Creates an add to set operator.
public UpdateDefinition<TDocument> AddToSet<TItem>(FieldDefinition<TDocument> field, TItem value)
Parameters
field
FieldDefinition<TDocument>The field.
value
TItemThe value.
Returns
- UpdateDefinition<TDocument>
An add to set operator.
Type Parameters
TItem
The type of the item.
AddToSet<TItem>(Expression<Func<TDocument, IEnumerable<TItem>>>, TItem)
Creates an add to set operator.
public UpdateDefinition<TDocument> AddToSet<TItem>(Expression<Func<TDocument, IEnumerable<TItem>>> field, TItem value)
Parameters
field
Expression<Func<TDocument, IEnumerable<TItem>>>The field.
value
TItemThe value.
Returns
- UpdateDefinition<TDocument>
An add to set operator.
Type Parameters
TItem
The type of the item.