Table of Contents

Method SortByDescending

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

SortByDescending<TResult>(IAggregateFluent<TResult>, Expression<Func<TResult, object>>)

Appends a descending sort stage to the pipeline.

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

Parameters

aggregate IAggregateFluent<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.