Table of Contents

Method SortByDescending

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

SortByDescending<TDocument, TProjection>(IFindFluent<TDocument, TProjection>, Expression<Func<TDocument, object>>)

Sorts the results by a descending field.

public static IOrderedFindFluent<TDocument, TProjection> SortByDescending<TDocument, TProjection>(this IFindFluent<TDocument, TProjection> find, Expression<Func<TDocument, object>> field)

Parameters

find IFindFluent<TDocument, TProjection>

The fluent find.

field Expression<Func<TDocument, object>>

The field.

Returns

IOrderedFindFluent<TDocument, TProjection>

The fluent find interface.

Type Parameters

TDocument

The type of the document.

TProjection

The type of the projection (same as TDocument if there is no projection).