The requested page is not available for the requested platform. You are viewing the content for .NET Framework 4.5.2+ platform.

XPClassInfo Class

Serves as a base for classes that provide metadata information for a class.

Namespace: DevExpress.Xpo.Metadata

Assembly: DevExpress.Xpo.v19.1.dll

Declaration

public abstract class XPClassInfo : XPTypeInfo, IXPClassInfoProvider, IXPDictionaryProvider
Public MustInherit Class XPClassInfo
    Inherits XPTypeInfo
    Implements IXPClassInfoProvider, IXPDictionaryProvider
public abstract class XPClassInfo : XPTypeInfo, IXPClassInfoProvider, IXPDictionaryProvider
Public MustInherit Class XPClassInfo
    Inherits XPTypeInfo
    Implements IXPClassInfoProvider, IXPDictionaryProvider

Examples

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));
customerClassInfo.CreateMember("Orders", typeof(XPCollection), true, 
    new AssociationAttribute("CustomerOrders", typeof(Order)), new AggregatedAttribute());
See Also