Method ElemMatch
ElemMatch<TValue>(Expression<Func<TDocument, IEnumerable<TValue>>>, Func<QueryBuilder<TValue>, IMongoQuery>)
Returns the first matching element in the array specified by name.
public static FieldsBuilder<TDocument> ElemMatch<TValue>(Expression<Func<TDocument, IEnumerable<TValue>>> memberExpression, Func<QueryBuilder<TValue>, IMongoQuery> elementQueryBuilderFunction)
Parameters
memberExpressionExpression<Func<TDocument, IEnumerable<TValue>>>The member expression.
elementQueryBuilderFunctionFunc<QueryBuilder<TValue>, IMongoQuery>The element query builder function.
Returns
- FieldsBuilder<TDocument>
The build (so method calls can be chained).
Type Parameters
TValueThe type of the value.