Table of Contents

Method ElemMatch

Namespace
MongoDB.Driver.Builders
Assembly
MongoDB.Driver.Legacy.dll

ElemMatch(string, IMongoQuery)

Tests that at least one item of the named array element matches a query (see $elemMatch).

public static IMongoQuery ElemMatch(string name, IMongoQuery query)

Parameters

name string

The name of the element to test.

query IMongoQuery

The query to match elements with.

Returns

IMongoQuery

An IMongoQuery.