DomainObjects Class Library

Criteria.AddOrderBy Method (Field, Boolean)

Specifies a field on which to sort the rows returned by a query. Sorts in ascending order.

public Criteria AddOrderBy(
   Field fieldToSortOn,
   Boolean sortAscending
);

Parameters

fieldToSortOn
A field from the object model to sort on. It can be a field in a persistable object, a constant or a function.
sortAscending
if set to true then sort the rows in ascending order of the fieldToSortOn, else sort in descending order.

Return Value

The current Criteria to which an order by clause has been added.

See Also

Criteria Class | DomainObjects.Facade.Command Namespace | Criteria.AddOrderBy Overload List