Click or drag to resize

MongoDatabaseBaseAggregateToCollectionAsyncTResult 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
public virtual 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.

Implements

IMongoDatabaseAggregateToCollectionAsyncTResult(PipelineDefinitionNoPipelineInput, TResult, AggregateOptions, CancellationToken)
See Also