Table of Contents

Class ExpressionFieldDefinition<TDocument>

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

An Expression based field.

public sealed class ExpressionFieldDefinition<TDocument> : FieldDefinition<TDocument>

Type Parameters

TDocument

The type of the document.

Inheritance
FieldDefinition<TDocument>
ExpressionFieldDefinition<TDocument>
Inherited Members

Constructors

ExpressionFieldDefinition(LambdaExpression)

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

public ExpressionFieldDefinition(LambdaExpression expression)

Parameters

expression LambdaExpression

The expression.

Properties

Expression

Gets the expression.

public LambdaExpression Expression { get; }

Property Value

LambdaExpression

Methods

Render(IBsonSerializer<TDocument>, IBsonSerializerRegistry, LinqProvider)

Renders the field to a string.

public override RenderedFieldDefinition 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

RenderedFieldDefinition

A string.