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
AggregateOptionsThe aggregate options
Returns
- IMongoQueryable<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
IClientSessionHandleThe session.
aggregateOptions
AggregateOptionsThe aggregate options
Returns
- IMongoQueryable<TDocument>
A queryable source of documents.
Type Parameters
TDocument
The type of the document.