XPO Templates
- 2 minutes to read
In This Article
This topic describes templates you can use when you implement business classes in eXpress Persistent Objects (XPO).
Important
Visual Studio Intelli
#Member Declaration
#XPO Persistent Class
Template: xc
public class PersistentClass : XPObject {
public PersistentClass(Session session) : base(session) { }
}
#XPO Persistent Property
Template: xp[1]
string propertyName;
[Size(SizeAttribute.DefaultStringMappingFieldSize)]
public string PropertyName {
get => propertyName;
set => SetPropertyValue(nameof(PropertyName), ref propertyName, value);
}
#XPO-Associated Property
Template: xpa
object propertyName;
[Association("object-Programs")]
public object PropertyName {
get => propertyName;
set => SetPropertyValue(nameof(PropertyName), ref propertyName, value);
}
#XPO-Associated Collection
Template: xpcl
[Association("Program-Relations")]
public XPCollection<RelationType> Relations {
get {
return GetCollection<RelationType>(nameof(Relations));
}
}
#XPO Read-Only Persistent Property
Template: xr[2]
[Persistent(nameof(PropertyName))]
int propertyName;
[PersistentAlias(nameof(propertyName))]
public int PropertyName {
get { return propertyName; }
}
Footnotes
See Also