Method Aggregate
Aggregate<TDocument>(IMongoCollection<TDocument>, AggregateOptions)
Begins a fluent aggregation interface.
public static IAggregateFluent<TDocument> Aggregate<TDocument>(this IMongoCollection<TDocument> collection, AggregateOptions options = null)
Parameters
collectionIMongoCollection<TDocument>The collection.
optionsAggregateOptionsThe options.
Returns
- IAggregateFluent<TDocument>
A fluent aggregate interface.
Type Parameters
TDocumentThe type of the document.
Aggregate<TDocument>(IMongoCollection<TDocument>, IClientSessionHandle, AggregateOptions)
Begins a fluent aggregation interface.
public static IAggregateFluent<TDocument> Aggregate<TDocument>(this IMongoCollection<TDocument> collection, IClientSessionHandle session, AggregateOptions options = null)
Parameters
collectionIMongoCollection<TDocument>The collection.
sessionIClientSessionHandleThe session.
optionsAggregateOptionsThe options.
Returns
- IAggregateFluent<TDocument>
A fluent aggregate interface.
Type Parameters
TDocumentThe type of the document.