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 IMongoQuery ElemMatch<TValue>(Expression<Func<TDocument, IEnumerable<TValue>>> memberExpression, Func<QueryBuilder<TValue>, IMongoQuery> elementQueryBuilderFunction)
Parameters
memberExpression
Expression<Func<TDocument, IEnumerable<TValue>>>The member expression representing the element to test.
elementQueryBuilderFunction
Func<QueryBuilder<TValue>, IMongoQuery>A function that builds a query using the supplied query builder.
Returns
- IMongoQuery
An IMongoQuery.
Type Parameters
TValue
The type of the enumerable member values.