Table of Contents

Method In

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

In<TMember>(Expression<Func<TDocument, TMember>>, IEnumerable<TMember>)

Tests that the value of the named element is equal to one of a list of values (see $in).

public static IMongoQuery In<TMember>(Expression<Func<TDocument, TMember>> memberExpression, IEnumerable<TMember> values)

Parameters

memberExpression Expression<Func<TDocument, TMember>>

The member expression representing the element to test.

values IEnumerable<TMember>

The values to compare to.

Returns

IMongoQuery

An IMongoQuery.

Type Parameters

TMember

The member type.

In<TValue>(Expression<Func<TDocument, IEnumerable<TValue>>>, IEnumerable<TValue>)

Tests that any of the values in the named array element are equal to one of a list of values (see $in).

public static IMongoQuery In<TValue>(Expression<Func<TDocument, IEnumerable<TValue>>> memberExpression, IEnumerable<TValue> values)

Parameters

memberExpression Expression<Func<TDocument, IEnumerable<TValue>>>

The member expression representing the element to test.

values IEnumerable<TValue>

The values to compare to.

Returns

IMongoQuery

An IMongoQuery.

Type Parameters

TValue

The type of the enumerable member values.