FilterDefinitionBuilderTDocumentElemMatchTItem Method (ExpressionFuncTDocument, IEnumerableTItem, ExpressionFuncTItem, Boolean) |
Creates an element match filter for an array field.
Namespace:
MongoDB.Driver
Assembly:
MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.10.0+569905ff5e778c38ea19d9d0392496a83e1704ed
Syntax public FilterDefinition<TDocument> ElemMatch<TItem>(
Expression<Func<TDocument, IEnumerable<TItem>>> field,
Expression<Func<TItem, bool>> filter
)
Public Function ElemMatch(Of TItem) (
field As Expression(Of Func(Of TDocument, IEnumerable(Of TItem))),
filter As Expression(Of Func(Of TItem, Boolean))
) As FilterDefinition(Of TDocument)
member ElemMatch :
field : Expression<Func<'TDocument, IEnumerable<'TItem>>> *
filter : Expression<Func<'TItem, bool>> -> FilterDefinition<'TDocument>
Parameters
- field
- Type: System.Linq.ExpressionsExpressionFuncTDocument, IEnumerableTItem
The field. - filter
- Type: System.Linq.ExpressionsExpressionFuncTItem, Boolean
The filter.
Type Parameters
- TItem
- The type of the item.
Return Value
Type:
FilterDefinitionTDocumentAn element match filter.
See Also