KREDOR Business Object Framework Documentation

OrAttribute Class

Specifies that the next WhereAttribute is to be OR-ed with the previus one.

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

System.Object
   Attribute
      OrAttribute

public class OrAttribute : 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.

Remarks

If the OrAttribute is not present between two WhereAttribute instances they are AND-ed. All joined fields must be decorated with the OnAttribute.

Example

This sample shows a class with two joined fields. The second field is decorated with an OrAttribute placed between two WhereAttrubutes.

[DataSource("MyDatabase")]
public class Account : BusinessObject
{
    private int _accountID;
    private string _name;
    private int _status;
    private DateTime _createDate;

    [On("accountid")]
    private Person _owner;

    [On("accountid", "account_id")]
    [Where("Status", Op.Equals, SubscriptionStatus.Active)]
    [Or][Where("Status", Op.Equals, SubscriptionStatus.Suspended)]
    private List<Subscription> _activeSubscriptions;
    
    public Account() : base ()
    {
    }

    protected override void OnLoad()
    {
    }
}

Requirements

Namespace: Kredor.BO

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

See Also

OrAttribute Members | Kredor.BO Namespace | OnAttribute | FromAttribute | SelectFrom