Class LinqExtensionMethods
Static class that contains the Mongo Linq extension methods.
public static class LinqExtensionMethods
- Inheritance
-
LinqExtensionMethods
- Inherited Members
Methods
AsQueryable<T>(MongoCollection)
Returns an instance of IQueryable{{T}} for a MongoCollection.
public static IQueryable<T> AsQueryable<T>(this MongoCollection collection)
Parameters
collection
MongoCollectionThe name of the collection.
Returns
- IQueryable<T>
An instance of IQueryable{{T}} for a MongoCollection.
Type Parameters
T
The type of the returned documents.
AsQueryable<T>(MongoCollection<T>)
Returns an instance of IQueryable{{T}} for a MongoCollection.
public static IQueryable<T> AsQueryable<T>(this MongoCollection<T> collection)
Parameters
collection
MongoCollection<T>The name of the collection.
Returns
- IQueryable<T>
An instance of IQueryable{{T}} for a MongoCollection.
Type Parameters
T
The type of the returned documents.
Explain<TSource>(IQueryable<TSource>)
Returns an explanation of how the query was executed (instead of the results).
public static BsonDocument Explain<TSource>(this IQueryable<TSource> source)
Parameters
source
IQueryable<TSource>The LINQ query to explain.
Returns
- BsonDocument
An explanation of thow the query was executed.
Type Parameters
TSource
The type of the elements of source.
Explain<TSource>(IQueryable<TSource>, bool)
Returns an explanation of how the query was executed (instead of the results).
public static BsonDocument Explain<TSource>(this IQueryable<TSource> source, bool verbose)
Parameters
source
IQueryable<TSource>The LINQ query to explain
verbose
boolWhether the explanation should contain more details.
Returns
- BsonDocument
An explanation of thow the query was executed.
Type Parameters
TSource
The type of the elements of source.