Table of Contents

Class SortBy<TDocument>

Namespace
MongoDB.Driver.Builders
Assembly
MongoDB.Driver.Legacy.dll

A builder for specifying a sort order.

public static class SortBy<TDocument>

Type Parameters

TDocument

The type of the document.

Inheritance
SortBy<TDocument>
Inherited Members

Methods

Ascending(params Expression<Func<TDocument, object>>[])

Adds keys to be sorted by in ascending order.

Descending(params Expression<Func<TDocument, object>>[])

Adds keys to be sorted by in descending order.

MetaTextScore(Expression<Func<TDocument, object>>)

Adds a key to sort by the computed relevance score when using text search. The name of the key should be the name of the projected relevance score field.