Method ReplaceRoot
ReplaceRoot<TInput, TOutput>(AggregateExpressionDefinition<TInput, TOutput>)
Creates a $replaceRoot stage.
public static PipelineStageDefinition<TInput, TOutput> ReplaceRoot<TInput, TOutput>(AggregateExpressionDefinition<TInput, TOutput> newRoot)
Parameters
newRootAggregateExpressionDefinition<TInput, TOutput>The new root.
Returns
- PipelineStageDefinition<TInput, TOutput>
The stage.
Type Parameters
TInputThe type of the input documents.
TOutputThe type of the output documents.
ReplaceRoot<TInput, TOutput>(Expression<Func<TInput, TOutput>>)
Creates a $replaceRoot stage.
public static PipelineStageDefinition<TInput, TOutput> ReplaceRoot<TInput, TOutput>(Expression<Func<TInput, TOutput>> newRoot)
Parameters
newRootExpression<Func<TInput, TOutput>>The new root.
Returns
- PipelineStageDefinition<TInput, TOutput>
The stage.
Type Parameters
TInputThe type of the input documents.
TOutputThe type of the output documents.