Method Aggregate
Aggregate<TResult>(PipelineDefinition<NoPipelineInput, TResult>, AggregateOptions, CancellationToken)
Runs an aggregation pipeline.
public virtual IAsyncCursor<TResult> Aggregate<TResult>(PipelineDefinition<NoPipelineInput, TResult> pipeline, AggregateOptions options = null, CancellationToken cancellationToken = default)
Parameters
pipeline
PipelineDefinition<NoPipelineInput, TResult>The pipeline.
options
AggregateOptionsThe options.
cancellationToken
CancellationTokenThe cancellation token.
Returns
- IAsyncCursor<TResult>
A cursor.
Type Parameters
TResult
The type of the result.
Aggregate<TResult>(IClientSessionHandle, PipelineDefinition<NoPipelineInput, TResult>, AggregateOptions, CancellationToken)
Runs an aggregation pipeline.
public virtual IAsyncCursor<TResult> Aggregate<TResult>(IClientSessionHandle session, PipelineDefinition<NoPipelineInput, TResult> pipeline, AggregateOptions options = null, CancellationToken cancellationToken = default)
Parameters
session
IClientSessionHandleThe session.
pipeline
PipelineDefinition<NoPipelineInput, TResult>The pipeline.
options
AggregateOptionsThe options.
cancellationToken
CancellationTokenThe cancellation token.
Returns
- IAsyncCursor<TResult>
A cursor.
Type Parameters
TResult
The type of the result.