Method AsQueryable
AsQueryable<TDocument>(IMongoCollection<TDocument>, AggregateOptions)
Creates a queryable source of documents.
public static IMongoQueryable<TDocument> AsQueryable<TDocument>(this IMongoCollection<TDocument> collection, AggregateOptions aggregateOptions = null)
Parameters
collection
IMongoCollection <TDocument>The collection.
aggregateOptions
AggregateOptions The aggregate options
Returns
- IMongo
Queryable <TDocument> A queryable source of documents.
Type Parameters
TDocument
The type of the document.
AsQueryable<TDocument>(IMongoCollection<TDocument>, IClientSessionHandle, AggregateOptions)
Creates a queryable source of documents.
public static IMongoQueryable<TDocument> AsQueryable<TDocument>(this IMongoCollection<TDocument> collection, IClientSessionHandle session, AggregateOptions aggregateOptions = null)
Parameters
collection
IMongoCollection <TDocument>The collection.
session
IClientSession Handle The session.
aggregateOptions
AggregateOptions The aggregate options
Returns
- IMongo
Queryable <TDocument> A queryable source of documents.
Type Parameters
TDocument
The type of the document.