Link Search Menu Expand Document

Order


This enum is used to define an ordering of the query results. It is usually used in Query, QueryAll and BatchQuery operations.

Enum Values

Below is the list of enum values.

NameDescription
AscendingIs used to define an ascending order. This is the default setting.
DescendingIs used to define a descending order.

Usability

Simply use the value when creating an OrderField object.

var orderBy = new OrderField("LastName", Order.Ascending);

Or, when parsing a dynamic or class object via OrderField object.

var orderBy = OrderField.Parse(new
{
    LastName = Order.Ascending,
    FirstName = Order.Descending
});

Or via Ascending or Descending method of the OrderField object.

var orderBy = OrderField.Descending<Person>(p => p.LastName);