Table of Contents

Method Ascending

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

Ascending(FieldDefinition<TDocument>)

Creates an ascending index key definition.

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

Parameters

field FieldDefinition<TDocument>

The field.

Returns

IndexKeysDefinition<TDocument>

An ascending index key definition.

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

Creates an ascending index key definition.

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

Parameters

field Expression<Func<TDocument, object>>

The field.

Returns

IndexKeysDefinition<TDocument>

An ascending index key definition.