Method AsQueryable
| MongoDB CSharp Driver API Reference (original) (raw)
Namespace
Assembly
MongoDB.Driver.dll
AsQueryable(IMongoCollection, AggregateOptions)
Creates a queryable source of documents.
public static IQueryable<TDocument> AsQueryable<TDocument>(this IMongoCollection<TDocument> collection, AggregateOptions aggregateOptions = null)Parameters
collection IMongoCollection
The collection.
aggregateOptions AggregateOptions
The aggregate options
Returns
A queryable source of documents.
Type Parameters
TDocument
The type of the document.
AsQueryable(IMongoCollection, IClientSessionHandle, AggregateOptions)
Creates a queryable source of documents.
public static IQueryable<TDocument> AsQueryable<TDocument>(this IMongoCollection<TDocument> collection, IClientSessionHandle session, AggregateOptions aggregateOptions = null)Parameters
collection IMongoCollection
The collection.
session IClientSessionHandle
The session.
aggregateOptions AggregateOptions
The aggregate options
Returns
A queryable source of documents.
Type Parameters
TDocument
The type of the document.