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
collection
IMongoCollection<TDocument>The collection.
options
AggregateOptionsThe options.
Returns
- IAggregateFluent<TDocument>
A fluent aggregate interface.
Type Parameters
TDocument
The 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
collection
IMongoCollection<TDocument>The collection.
session
IClientSessionHandleThe session.
options
AggregateOptionsThe options.
Returns
- IAggregateFluent<TDocument>
A fluent aggregate interface.
Type Parameters
TDocument
The type of the document.