Method ReplaceRoot
ReplaceRoot<TInput, TIntermediate, TOutput>(PipelineDefinition<TInput, TIntermediate>, AggregateExpressionDefinition<TIntermediate, TOutput>)
Appends a $replaceRoot stage to the pipeline.
public static PipelineDefinition<TInput, TOutput> ReplaceRoot<TInput, TIntermediate, TOutput>(this PipelineDefinition<TInput, TIntermediate> pipeline, AggregateExpressionDefinition<TIntermediate, TOutput> newRoot)
Parameters
pipeline
PipelineDefinition<TInput, TIntermediate>The pipeline.
newRoot
AggregateExpressionDefinition<TIntermediate, TOutput>The new root.
Returns
- PipelineDefinition<TInput, TOutput>
A new pipeline with an additional stage.
Type Parameters
TInput
The type of the input documents.
TIntermediate
The type of the intermediate documents.
TOutput
The type of the output documents.
ReplaceRoot<TInput, TIntermediate, TOutput>(PipelineDefinition<TInput, TIntermediate>, Expression<Func<TIntermediate, TOutput>>)
Appends a $replaceRoot stage to the pipeline.
public static PipelineDefinition<TInput, TOutput> ReplaceRoot<TInput, TIntermediate, TOutput>(this PipelineDefinition<TInput, TIntermediate> pipeline, Expression<Func<TIntermediate, TOutput>> newRoot)
Parameters
pipeline
PipelineDefinition<TInput, TIntermediate>The pipeline.
newRoot
Expression<Func<TIntermediate, TOutput>>The new root.
Returns
- PipelineDefinition<TInput, TOutput>
A new pipeline with an additional stage.
Type Parameters
TInput
The type of the input documents.
TIntermediate
The type of the intermediate documents.
TOutput
The type of the output documents.