Table of Contents

Method Ascending

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

Ascending(FieldDefinition<TDocument>)

Creates an ascending sort.

public SortDefinition<TDocument> Ascending(FieldDefinition<TDocument> field)

Parameters

field FieldDefinition<TDocument>

The field.

Returns

SortDefinition<TDocument>

An ascending sort.

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

Creates an ascending sort.

public SortDefinition<TDocument> Ascending(Expression<Func<TDocument, object>> field)

Parameters

field Expression<Func<TDocument, object>>

The field.

Returns

SortDefinition<TDocument>

An ascending sort.