Represents an ORDER BY/SORT BY tuple, for example: "LastName Descending".
For a list of all members of this type, see OrderBy Members.
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("City") .OrderBy("BeginDate", OrderDirection.Descending) .Select(); // 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") .OrderBy("Principal.CurrentAddress.City");
Assembly: KREDOR.BOFramework (in KREDOR.BOFramework.dll)