Method ElemMatch
ElemMatch<TValue>(Expression<Func<TDocument, IEnumerable<TValue>>>, Func<QueryBuilder<TValue>, IMongoQuery>)
Tests that at least one item of the named array element matches a query (see $elemMatch).
public static IMongoQuery ElemMatch<TValue>(Expression<Func<TDocument, IEnumerable<TValue>>> memberExpression, Func<QueryBuilder<TValue>, IMongoQuery> elementQueryBuilderFunction)
Parameters
memberExpressionExpression<Func<TDocument, IEnumerable<TValue>>>The member expression representing the element to test.
elementQueryBuilderFunctionFunc<QueryBuilder<TValue>, IMongoQuery>A function that builds a query using the supplied query builder.
Returns
- IMongoQuery
An IMongoQuery.
Type Parameters
TValueThe type of the enumerable member values.