Table of Contents

Method Set

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

Set<TResult, TFields>(IAggregateFluent<TResult>, Expression<Func<TResult, TFields>>)

Appends a $set stage to the pipeline.

public static IAggregateFluent<TResult> Set<TResult, TFields>(this IAggregateFluent<TResult> aggregate, Expression<Func<TResult, TFields>> fields)

Parameters

aggregate IAggregateFluent<TResult>

The aggregate.

fields Expression<Func<TResult, TFields>>

The fields to set.

Returns

IAggregateFluent<TResult>

The fluent aggregate interface.

Type Parameters

TResult

The type of the result.

TFields

The type of object specifying the fields to set.