EasyObjects.NET Programmers Reference

DynamicQuery.AddOrderBy Method (SchemaItem)

Adds an ORDER BY clause to the query using the FieldName of the SchemaItem. If you want to order the data by two columns you will need to call this method twice.

public virtual void AddOrderBy(
   SchemaItem item
);

Parameters

item
A SchemaItem for the column you want to sort by

Remarks

The default sort order is ascending.

Example

emps.Query.AddOrderBy(EmployeesSchema.LastName)
emps.Query.AddOrderBy(EmployeesSchema.FirstName)

See Also

DynamicQuery Class | NCI.EasyObjects Namespace | DynamicQuery.AddOrderBy Overload List