Table of Contents

Method Where

Namespace
MongoDB.Driver.Linq
Assembly
MongoDB.Driver.dll

Where<TSource>(IMongoQueryable<TSource>, Expression<Func<TSource, bool>>)

Filters a sequence of values based on a predicate.

public static IMongoQueryable<TSource> Where<TSource>(this IMongoQueryable<TSource> source, Expression<Func<TSource, bool>> predicate)

Parameters

source IMongoQueryable<TSource>

An IMongoQueryable<T> to return elements from.

predicate Expression<Func<TSource, bool>>

A function to test each element for a condition.

Returns

IMongoQueryable<TSource>

An IMongoQueryable<T> that contains elements from the input sequence that satisfy the condition specified by predicate.

Type Parameters

TSource

The type of the elements of source.