Click or drag to resize

IMongoCollection<TDocument>.Aggregate<TResult> Method (PipelineDefinition<TDocument, TResult>, AggregateOptions, CancellationToken)

Runs an aggregation pipeline.

Namespace:  MongoDB.Driver
Assembly:  MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.5.0+57.Branch.master.Sha.6a4e00a2d91090c65a9b11364b9ebfdb9c7da076
Syntax
IAsyncCursor<TResult> Aggregate<TResult>(
	PipelineDefinition<TDocument, TResult> pipeline,
	AggregateOptions options = null,
	CancellationToken cancellationToken = null
)

Parameters

pipeline
Type: MongoDB.Driver.PipelineDefinition<TDocument, TResult>
The pipeline.
options (Optional)
Type: MongoDB.Driver.AggregateOptions
The options.
cancellationToken (Optional)
Type: System.Threading.CancellationToken
The cancellation token.

Type Parameters

TResult
The type of the result.

Return Value

Type: IAsyncCursor<TResult>
A cursor.
See Also