Click or drag to resize

IMongoDatabaseAggregateToCollectionAsyncTResult Method (PipelineDefinitionNoPipelineInput, TResult, AggregateOptions, CancellationToken)

Runs an aggregation pipeline.

Namespace:  MongoDB.Driver
Assembly:  MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.19.1+3a2a09dd959482f665ffbb5df2557ec541597af4
Syntax
Task AggregateToCollectionAsync<TResult>(
	PipelineDefinition<NoPipelineInput, TResult> pipeline,
	AggregateOptions options = null,
	CancellationToken cancellationToken = default
)

Parameters

pipeline
Type: MongoDB.DriverPipelineDefinitionNoPipelineInput, TResult
The pipeline.
options (Optional)
Type: MongoDB.DriverAggregateOptions
The options.
cancellationToken (Optional)
Type: System.ThreadingCancellationToken
The cancellation token.

Type Parameters

TResult
The type of the result.

Return Value

Type: Task
A Task.
See Also