Method ReplaceWith
ReplaceWith<TInput, TOutput>(AggregateExpressionDefinition<TInput, TOutput>)
Creates a $replaceWith stage.
public static PipelineStageDefinition<TInput, TOutput> ReplaceWith<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.
ReplaceWith<TInput, TOutput>(Expression<Func<TInput, TOutput>>, ExpressionTranslationOptions)
Creates a $replaceWith stage.
public static PipelineStageDefinition<TInput, TOutput> ReplaceWith<TInput, TOutput>(Expression<Func<TInput, TOutput>> newRoot, ExpressionTranslationOptions translationOptions = null)
Parameters
newRootExpression<Func<TInput, TOutput>>The new root.
translationOptionsExpressionTranslationOptionsThe translation options.
Returns
- PipelineStageDefinition<TInput, TOutput>
The stage.
Type Parameters
TInputThe type of the input documents.
TOutputThe type of the output documents.