Click or drag to resize

IAggregateFluent<TResult>.ReplaceRoot<TNewResult> Method

Appends a $replaceRoot stage to the pipeline.

Namespace:  MongoDB.Driver
Assembly:  MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.16.0+eeafbea0921243a5868b81984e1083a07c1f75bc
Syntax
IAggregateFluent<TNewResult> ReplaceRoot<TNewResult>(
	AggregateExpressionDefinition<TResult, TNewResult> newRoot
)

Parameters

newRoot
Type: MongoDB.Driver.AggregateExpressionDefinition<TResult, TNewResult>
The new root.

Type Parameters

TNewResult
The type of the new result.

Return Value

Type: IAggregateFluent<TNewResult>
The fluent aggregate interface.
See Also