Table of Contents

Class IAggregateFluentExtensions

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

Extension methods for IAggregateFluent<TResult>

public static class IAggregateFluentExtensions
Inheritance
IAggregateFluentExtensions
Inherited Members

Methods

BucketAuto<TResult, TValue>(IAggregateFluent<TResult>, Expression<Func<TResult, TValue>>, int, AggregateBucketAutoOptions)

Appends a $bucketAuto stage to the pipeline.

BucketAuto<TResult, TValue, TNewResult>(IAggregateFluent<TResult>, Expression<Func<TResult, TValue>>, int, Expression<Func<IGrouping<AggregateBucketAutoResultId<TValue>, TResult>, TNewResult>>, AggregateBucketAutoOptions)

Appends a $bucketAuto stage to the pipeline (this overload can only be used with LINQ3).

Bucket<TResult, TValue>(IAggregateFluent<TResult>, Expression<Func<TResult, TValue>>, IEnumerable<TValue>, AggregateBucketOptions<TValue>)

Appends a $bucket stage to the pipeline.

Bucket<TResult, TValue, TNewResult>(IAggregateFluent<TResult>, Expression<Func<TResult, TValue>>, IEnumerable<TValue>, Expression<Func<IGrouping<TValue, TResult>, TNewResult>>, AggregateBucketOptions<TValue>)

Appends a $bucket stage to the pipeline.

ChangeStreamSplitLargeEvent<TResult>(IAggregateFluent<ChangeStreamDocument<TResult>>)

Appends a $changeStreamSplitLargeEvent stage to the pipeline.

Densify<TResult>(IAggregateFluent<TResult>, Expression<Func<TResult, object>>, DensifyRange, IEnumerable<Expression<Func<TResult, object>>>)

Appends a $densify stage to the pipeline.

Densify<TResult>(IAggregateFluent<TResult>, Expression<Func<TResult, object>>, DensifyRange, params Expression<Func<TResult, object>>[])

Appends a $densify stage to the pipeline.

Documents<TResult>(IAggregateFluent<NoPipelineInput>, AggregateExpressionDefinition<NoPipelineInput, IEnumerable<TResult>>, IBsonSerializer<TResult>)

Appends a $documents stage to the pipeline.

Documents<TResult>(IAggregateFluent<NoPipelineInput>, IEnumerable<TResult>, IBsonSerializer<TResult>)

Appends a $documents stage to the pipeline.

Facet<TResult>(IAggregateFluent<TResult>, params AggregateFacet<TResult>[])

Appends a $facet stage to the pipeline.

Facet<TResult>(IAggregateFluent<TResult>, IEnumerable<AggregateFacet<TResult>>)

Appends a $facet stage to the pipeline.

Facet<TResult, TNewResult>(IAggregateFluent<TResult>, params AggregateFacet<TResult>[])

Appends a $facet stage to the pipeline.

FirstAsync<TResult>(IAggregateFluent<TResult>, CancellationToken)

Returns the first document of the aggregate result.

FirstOrDefaultAsync<TResult>(IAggregateFluent<TResult>, CancellationToken)

Returns the first document of the aggregate result, or the default value if the result set is empty.

FirstOrDefault<TResult>(IAggregateFluent<TResult>, CancellationToken)

Returns the first document of the aggregate result, or the default value if the result set is empty.

First<TResult>(IAggregateFluent<TResult>, CancellationToken)

Returns the first document of the aggregate result.

GraphLookup<TResult, TFrom>(IAggregateFluent<TResult>, IMongoCollection<TFrom>, FieldDefinition<TFrom, BsonValue>, FieldDefinition<TFrom, BsonValue>, AggregateExpressionDefinition<TResult, BsonValue>, FieldDefinition<BsonDocument, IEnumerable<BsonDocument>>, FieldDefinition<BsonDocument, int>)

Appends a $graphLookup stage to the pipeline.

GraphLookup<TResult, TFrom, TConnectFrom, TConnectTo, TStartWith, TAs, TNewResult>(IAggregateFluent<TResult>, IMongoCollection<TFrom>, FieldDefinition<TFrom, TConnectFrom>, FieldDefinition<TFrom, TConnectTo>, AggregateExpressionDefinition<TResult, TStartWith>, FieldDefinition<TNewResult, TAs>, AggregateGraphLookupOptions<TFrom, TFrom, TNewResult>)

Appends a $graphLookup stage to the pipeline.

GraphLookup<TResult, TFrom, TConnectFrom, TConnectTo, TStartWith, TAs, TNewResult>(IAggregateFluent<TResult>, IMongoCollection<TFrom>, Expression<Func<TFrom, TConnectFrom>>, Expression<Func<TFrom, TConnectTo>>, Expression<Func<TResult, TStartWith>>, Expression<Func<TNewResult, TAs>>, AggregateGraphLookupOptions<TFrom, TFrom, TNewResult>)

Appends a $graphLookup stage to the pipeline.

GraphLookup<TResult, TFrom, TConnectFrom, TConnectTo, TStartWith, TAsElement, TAs, TNewResult>(IAggregateFluent<TResult>, IMongoCollection<TFrom>, Expression<Func<TFrom, TConnectFrom>>, Expression<Func<TFrom, TConnectTo>>, Expression<Func<TResult, TStartWith>>, Expression<Func<TNewResult, TAs>>, Expression<Func<TAsElement, int>>, AggregateGraphLookupOptions<TFrom, TAsElement, TNewResult>)

Appends a $graphLookup stage to the pipeline.

Group<TResult>(IAggregateFluent<TResult>, ProjectionDefinition<TResult, BsonDocument>)

Appends a group stage to the pipeline.

Group<TResult, TKey, TNewResult>(IAggregateFluent<TResult>, Expression<Func<TResult, TKey>>, Expression<Func<IGrouping<TKey, TResult>, TNewResult>>)

Appends a group stage to the pipeline.

Lookup<TResult>(IAggregateFluent<TResult>, IMongoCollection<BsonDocument>, BsonDocument, PipelineDefinition<BsonDocument, BsonDocument>, FieldDefinition<BsonDocument, IEnumerable<BsonDocument>>)

Appends a lookup stage to the pipeline.

Lookup<TResult>(IAggregateFluent<TResult>, string, FieldDefinition<TResult>, FieldDefinition<BsonDocument>, FieldDefinition<BsonDocument>)

Appends a lookup stage to the pipeline.

Lookup<TResult, TForeignDocument, TNewResult>(IAggregateFluent<TResult>, IMongoCollection<TForeignDocument>, Expression<Func<TResult, object>>, Expression<Func<TForeignDocument, object>>, Expression<Func<TNewResult, object>>, AggregateLookupOptions<TForeignDocument, TNewResult>)

Appends a lookup stage to the pipeline.

Lookup<TResult, TForeignDocument, TAsElement, TAs, TNewResult>(IAggregateFluent<TResult>, IMongoCollection<TForeignDocument>, BsonDocument, PipelineDefinition<TForeignDocument, TAsElement>, Expression<Func<TNewResult, TAs>>, AggregateLookupOptions<TForeignDocument, TNewResult>)

Appends a lookup stage to the pipeline.

Match<TResult>(IAggregateFluent<TResult>, Expression<Func<TResult, bool>>)

Appends a match stage to the pipeline.

Project<TResult>(IAggregateFluent<TResult>, ProjectionDefinition<TResult, BsonDocument>)

Appends a project stage to the pipeline.

Project<TResult, TNewResult>(IAggregateFluent<TResult>, Expression<Func<TResult, TNewResult>>)

Appends a project stage to the pipeline.

ReplaceRoot<TResult, TNewResult>(IAggregateFluent<TResult>, Expression<Func<TResult, TNewResult>>)

Appends a $replaceRoot stage to the pipeline.

ReplaceWith<TResult, TNewResult>(IAggregateFluent<TResult>, Expression<Func<TResult, TNewResult>>)

Appends a $replaceWith stage to the pipeline.

SetWindowFields<TResult, TWindowFields>(IAggregateFluent<TResult>, Expression<Func<ISetWindowFieldsPartition<TResult>, TWindowFields>>)

Appends a $setWindowFields to the pipeline.

SetWindowFields<TResult, TPartitionBy, TWindowFields>(IAggregateFluent<TResult>, Expression<Func<TResult, TPartitionBy>>, SortDefinition<TResult>, Expression<Func<ISetWindowFieldsPartition<TResult>, TWindowFields>>)

Appends a $setWindowFields to the pipeline.

SetWindowFields<TResult, TPartitionBy, TWindowFields>(IAggregateFluent<TResult>, Expression<Func<TResult, TPartitionBy>>, Expression<Func<ISetWindowFieldsPartition<TResult>, TWindowFields>>)

Appends a $setWindowFields to the pipeline.

Set<TResult, TFields>(IAggregateFluent<TResult>, Expression<Func<TResult, TFields>>)

Appends a $set stage to the pipeline.

SingleAsync<TResult>(IAggregateFluent<TResult>, CancellationToken)

Returns the only document of the aggregate result. Throws an exception if the result set does not contain exactly one document.

SingleOrDefaultAsync<TResult>(IAggregateFluent<TResult>, CancellationToken)

Returns the only document of the aggregate result, or the default value if the result set is empty. Throws an exception if the result set contains more than one document.

SingleOrDefault<TResult>(IAggregateFluent<TResult>, CancellationToken)

Returns the only document of the aggregate result, or the default value if the result set is empty. Throws an exception if the result set contains more than one document.

Single<TResult>(IAggregateFluent<TResult>, CancellationToken)

Returns the only document of the aggregate result. Throws an exception if the result set does not contain exactly one document.

SortByCount<TResult, TKey>(IAggregateFluent<TResult>, Expression<Func<TResult, TKey>>)

Appends a sortByCount stage to the pipeline.

SortByDescending<TResult>(IAggregateFluent<TResult>, Expression<Func<TResult, object>>)

Appends a descending sort stage to the pipeline.

SortBy<TResult>(IAggregateFluent<TResult>, Expression<Func<TResult, object>>)

Appends an ascending sort stage to the pipeline.

ThenByDescending<TResult>(IOrderedAggregateFluent<TResult>, Expression<Func<TResult, object>>)

Modifies the current sort stage by appending a descending field specification to it.

ThenBy<TResult>(IOrderedAggregateFluent<TResult>, Expression<Func<TResult, object>>)

Modifies the current sort stage by appending an ascending field specification to it.

Unwind<TResult>(IAggregateFluent<TResult>, FieldDefinition<TResult>)

Appends an unwind stage to the pipeline.

Unwind<TResult>(IAggregateFluent<TResult>, Expression<Func<TResult, object>>)

Appends an unwind stage to the pipeline.

Unwind<TResult, TNewResult>(IAggregateFluent<TResult>, Expression<Func<TResult, object>>, IBsonSerializer<TNewResult>)

Appends an unwind stage to the pipeline.

Unwind<TResult, TNewResult>(IAggregateFluent<TResult>, Expression<Func<TResult, object>>, AggregateUnwindOptions<TNewResult>)

Appends an unwind stage to the pipeline.

VectorSearch<TResult>(IAggregateFluent<TResult>, Expression<Func<TResult, object>>, QueryVector, int, VectorSearchOptions<TResult>)

Appends a $vectorSearch stage.