Method Project
Project<TResult>(IAggregateFluent<TResult>, ProjectionDefinition<TResult, BsonDocument>)
Appends a project stage to the pipeline.
public static IAggregateFluent<BsonDocument> Project<TResult>(this IAggregateFluent<TResult> aggregate, ProjectionDefinition<TResult, BsonDocument> projection)
Parameters
aggregateIAggregateFluent<TResult>The aggregate.
projectionProjectionDefinition<TResult, BsonDocument>The projection.
Returns
- IAggregateFluent<BsonDocument>
The fluent aggregate interface.
Type Parameters
TResultThe type of the result.
Project<TResult, TNewResult>(IAggregateFluent<TResult>, Expression<Func<TResult, TNewResult>>)
Appends a project stage to the pipeline.
public static IAggregateFluent<TNewResult> Project<TResult, TNewResult>(this IAggregateFluent<TResult> aggregate, Expression<Func<TResult, TNewResult>> projection)
Parameters
aggregateIAggregateFluent<TResult>The aggregate.
projectionExpression<Func<TResult, TNewResult>>The projection.
Returns
- IAggregateFluent<TNewResult>
The fluent aggregate interface.
Type Parameters
TResultThe type of the result.
TNewResultThe type of the new result.