Table of Contents

Class SelectQuery

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

Represents a LINQ query that has been translated to an equivalent MongoDB Find query.

public class SelectQuery : TranslatedQuery
Inheritance
SelectQuery
Inherited Members
Extension Methods

Constructors

SelectQuery(MongoCollection, Type)

Initializes a new instance of the MongoLinqFindQuery class.

Properties

IndexHint

Gets the BsonValue (string or document) that defines which index to use (or null if not specified);

OfType

Gets the final result type if an OfType query operator was used (otherwise null).

OrderBy

Gets a list of Expressions that defines the sort order (or null if not specified).

Projection

Gets the Expression that defines the projection (or null if not specified).

Skip

Gets the Expression that defines how many documents to skip (or null if not specified).

Take

Gets the Expression that defines how many documents to take (or null if not specified);

Where

Gets the LambdaExpression that defines the where clause (or null if not specified).

Methods

BuildQuery()

Creates an IMongoQuery from the where clause (returns null if no where clause was specified).

Execute()

Executes the translated Find query.

Translate(Expression)

Translates a LINQ query expression tree.