Table of Contents

Class TranslatedQuery

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

Represents a LINQ query that has been translated to a MongoDB query.

public abstract class TranslatedQuery
Inheritance
TranslatedQuery
Derived
Inherited Members
Extension Methods

Constructors

TranslatedQuery(MongoCollection, Type)

Initializes a new instance of the MongoLinqQuery class.

protected TranslatedQuery(MongoCollection collection, Type documentType)

Parameters

collection MongoCollection

The collection being queried.

documentType Type

The document type being queried.

Properties

Collection

Gets the collection being queried.

public MongoCollection Collection { get; }

Property Value

MongoCollection

DocumentType

Get the document type being queried.

public Type DocumentType { get; }

Property Value

Type

Methods

Execute()

Executes a query that returns a single result (overridden by subclasses).

public virtual object Execute()

Returns

object

The result of executing the query.