C# CopyCode imageCopy Code
[DefaultClassOptions]
public class Contact : Person {
//...
private Department department;
[Association("Department-Contacts", typeof(Department))]
public Department Department {
get {return department;}
set {SetPropertyValue("Department", ref department, value);}
}
//...
}
public class Department : BaseObject {
//...
[Association("Department-Contacts", typeof(Contact))]
public XPCollection Contacts {
get { return GetCollection("Contacts"); }
}
}