KREDOR Business Object Framework Documentation

OrderByAttribute Class

Specifies an OrderBy clause to be used when selecting the objects for a joined field.

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


public class OrderByAttribute : Attribute

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.


Multiple instances of this attribute may be specified to make an ORDER BY list. All joined fields must be decorated with the OnAttribute. Joined fields must be either of a type derived directly or indirectly from BusinessObject or of a type that implements the IList interface such as List<T> or ArrayList; where T is a type derived from BusinessObject.


This sample shows a class with a joined fields decorated with the OrderByAttribute.

public class Account : BusinessObject
    private int _accountID;
    private string _name;
    private int _status;
    private DateTime _createDate;

    [On("accountid", "account_id")]
    [Where("Status", Op.Equals, SubscriptionStatus.Active)]
    [OrderBy("EndDate", OrderDirection.Descending)]
    public List<Subscription> _subscriptions;
    public Account() : base ()

    protected override void OnLoad()


Namespace: Kredor.BO

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

See Also

OrderByAttribute Members | Kredor.BO Namespace | OnAttribute | FromAttribute | WhereAttribute | SelectFrom