XPClassInfo Class
Serves as a base for classes that provide metadata information for a class.
Namespace: DevExpress.Xpo.Metadata
Assembly: DevExpress.Xpo.v24.1.dll
NuGet Packages: DevExpress.Win.PivotGrid, DevExpress.Win.TreeMap, DevExpress.Xpo
NuGet Package: DevExpress.Xpo
Declaration
Example
The following sample code shows how to create custom fields using the XPClassInfo.CreateMember method.
using DevExpress.Xpo;
using DevExpress.Xpo.Metadata;
// ...
XPClassInfo customerClassInfo = Session.DefaultSession.GetClassInfo(typeof(Customer));
customerClassInfo.CreateMember("Name", typeof(string));
customerClassInfo.CreateMember("CompanyName", typeof(string));
// Set the nonPersistent parameter to true for collection properties
customerClassInfo.CreateMember("Orders", typeof(XPCollection), true,
new AssociationAttribute("CustomerOrders", typeof(Order)), new AggregatedAttribute());
Inheritance
See Also