Table of Contents

Class ExpressionFilterDefinition<TDocument>

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

An Expression based filter.

public sealed class ExpressionFilterDefinition<TDocument> : FilterDefinition<TDocument>

Type Parameters

TDocument

The type of the document.

Inheritance
FilterDefinition<TDocument>
ExpressionFilterDefinition<TDocument>
Inherited Members
Extension Methods

Constructors

ExpressionFilterDefinition(Expression<Func<TDocument, bool>>)

Initializes a new instance of the ExpressionFilterDefinition<TDocument> class.

public ExpressionFilterDefinition(Expression<Func<TDocument, bool>> expression)

Parameters

expression Expression<Func<TDocument, bool>>

The expression.

Properties

Expression

Gets the expression.

public Expression<Func<TDocument, bool>> Expression { get; }

Property Value

Expression<Func<TDocument, bool>>

Methods

Render(IBsonSerializer<TDocument>, IBsonSerializerRegistry, LinqProvider)

Renders the filter to a BsonDocument.

public override BsonDocument Render(IBsonSerializer<TDocument> documentSerializer, IBsonSerializerRegistry serializerRegistry, LinqProvider linqProvider)

Parameters

documentSerializer IBsonSerializer<TDocument>

The document serializer.

serializerRegistry IBsonSerializerRegistry

The serializer registry.

linqProvider LinqProvider

The LINQ provider.

Returns

BsonDocument

A BsonDocument.