Click or drag to resize

FilterDefinitionBuilderTDocumentElemMatchTItem Method (FieldDefinitionTDocument, FilterDefinitionTItem)

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>(
	FieldDefinition<TDocument> field,
	FilterDefinition<TItem> filter
)

Parameters

field
Type: MongoDB.DriverFieldDefinitionTDocument
The field.
filter
Type: MongoDB.DriverFilterDefinitionTItem
The filter.

Type Parameters

TItem
The type of the item.

Return Value

Type: FilterDefinitionTDocument
An element match filter.
See Also