KREDOR Business Object Framework Documentation

WhereAttribute Class

Specifies a criteria to further filter the value(s) for a joined field.

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

System.Object
   Attribute
      WhereAttribute

public class WhereAttribute : 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 more than one WhereAttributes are specified 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 a WhereAttribute to load only active subscriptions.

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

    [On("accountid")]
    public Person _owner;
    
    [On("accountid", "account_id")]
    [Where("Status", Op.Equals, SubscriptionStatus.Active)]
    public List<Subscription> _subscriptions;
    
    public Account() : base ()
    {
    }

    protected override void OnLoad()
    {
    }
}

Requirements

Namespace: Kredor.BO

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

See Also

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