Table of Contents

Method ReplaceRoot

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

ReplaceRoot<TNewResult>(AggregateExpressionDefinition<TResult, TNewResult>)

Appends a $replaceRoot stage to the pipeline.

public virtual IAggregateFluent<TNewResult> ReplaceRoot<TNewResult>(AggregateExpressionDefinition<TResult, TNewResult> newRoot)

Parameters

newRoot AggregateExpressionDefinition<TResult, TNewResult>

The new root.

Returns

IAggregateFluent<TNewResult>

The fluent aggregate interface.

Type Parameters

TNewResult

The type of the new result.