Method ReplaceRoot
ReplaceRoot<TResult, TNewResult>(IAggregateFluent<TResult>, Expression<Func<TResult, TNewResult>>)
Appends a $replaceRoot stage to the pipeline.
public static IAggregateFluent<TNewResult> ReplaceRoot<TResult, TNewResult>(this IAggregateFluent<TResult> aggregate, Expression<Func<TResult, TNewResult>> newRoot)
Parameters
aggregateIAggregateFluent<TResult>The aggregate.
newRootExpression<Func<TResult, TNewResult>>The new root.
Returns
- IAggregateFluent<TNewResult>
The fluent aggregate interface.
Type Parameters
TResultThe type of the result.
TNewResultThe type of the new result.