KREDOR Business Object Framework Documentation

OrderBy Class

Represents an ORDER BY/SORT BY tuple, for example: "LastName Descending".

For a list of all members of this type, see OrderBy Members.


public class OrderBy :

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.


This code demonstrates an usage of OrderBy when loading a collection of objects. Note: Column.State.Ascending and Column.BeginDate.Descending return OrderBy instances.

ArrayList conferences = SelectFrom.From(typeof(Conference))
                                         .OrderBy("BeginDate", OrderDirection.Descending)
// Sort an ArrayList by a deep nested property of the contained objects.
// Example: Ascending sort by the City where the account principal/owner resides.
ArrayList accounts = ...;
accounts.Sort(new OrderBy("Principal.CurrentAddress.City"));

// Load objects using a stored procedure and sort them in the same statement:
accounts = SelectFrom.From(typeof(Account)).StoredProcedure("getBusinessAccounts")


Namespace: Kredor.BO

Assembly: KREDOR.BOFramework (in KREDOR.BOFramework.dll)

See Also

OrderBy Members | Kredor.BO Namespace | SelectFrom | Column