Click or drag to resize

IMongoDatabase.AggregateAsync<TResult> Method (PipelineDefinition<NoPipelineInput, TResult>, AggregateOptions, CancellationToken)

Runs an aggregation pipeline.

Namespace:  MongoDB.Driver
Assembly:  MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.21.0+5a9c3311e158910b88195f290e6d4b1b2715d2b2
Syntax
Task<IAsyncCursor<TResult>> AggregateAsync<TResult>(
	PipelineDefinition<NoPipelineInput, TResult> pipeline,
	AggregateOptions options = null,
	CancellationToken cancellationToken = null
)

Parameters

pipeline
Type: MongoDB.Driver.PipelineDefinition<NoPipelineInput, 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: Task<IAsyncCursor<TResult>>
A Task whose result is a cursor.
See Also