Table of Contents

Class LinqExtensions

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

This static class holds methods that can be used to express MongoDB specific operations in LINQ queries.

public static class LinqExtensions
Inheritance
LinqExtensions
Inherited Members

Methods

Inject<TDocument>(FilterDefinition<TDocument>)

Injects a low level FilterDefinition{TDocument} into a LINQ where clause. Can only be used in LINQ queries.

public static bool Inject<TDocument>(this FilterDefinition<TDocument> filter)

Parameters

filter FilterDefinition<TDocument>

The filter.

Returns

bool

Throws an InvalidOperationException if called.

Type Parameters

TDocument

The type of the document.