Table of Contents

Method ThenBy

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

ThenBy<TResult>(IOrderedAggregateFluent<TResult>, Expression<Func<TResult, object>>)

Modifies the current sort stage by appending an ascending field specification to it.

public static IOrderedAggregateFluent<TResult> ThenBy<TResult>(this IOrderedAggregateFluent<TResult> aggregate, Expression<Func<TResult, object>> field)

Parameters

aggregate IOrderedAggregateFluent<TResult>

The aggregate.

field Expression<Func<TResult, object>>

The field to sort by.

Returns

IOrderedAggregateFluent<TResult>

The fluent aggregate interface.

Type Parameters

TResult

The type of the result.