Method AddToSet
AddToSet<TValue>(Expression<Func<TDocument, IEnumerable<TValue>>>, TValue)
Adds a value to a named array element if the value is not already in the array (see $addToSet).
public UpdateBuilder<TDocument> AddToSet<TValue>(Expression<Func<TDocument, IEnumerable<TValue>>> memberExpression, TValue value)
Parameters
memberExpressionExpression<Func<TDocument, IEnumerable<TValue>>>The member expression.
valueTValueThe value to add to the set.
Returns
- UpdateBuilder<TDocument>
The builder (so method calls can be chained).
Type Parameters
TValueThe type of the enumerable member values.