XAF0016: Descendants of NonPersistentBaseObject and NonPersistentLiteObject must be decorated with the DomainComponent attribute
In This Article
Severity: Error
XAF requires that the NonPersistentBaseObject
and NonPersistentLiteObject
descendants must be decorated with the DomainComponentAttribute attribute
#Examples
#Invalid Code
using DevExpress.Xpo;
namespace MySolution.Module.BusinessObjects{
// Descendant of NonPersistentBaseObject must be decorated with the DomainComponentAttribute
public class NonPersistentBaseObjectWithoutDomainComponent : NonPersistentBaseObject {}
// Descendant of NonPersistentLiteObject must be decorated with the DomainComponentAttribute
public class NonPersistentLiteObjectWithoutDomainComponent : NonPersistentLiteObject {}
}
#Valid Code
using DevExpress.Xpo;
using DevExpress.ExpressApp.DC;
namespace MySolution.Module.BusinessObjects {
[DomainComponent]
public class NonPersistentBaseObjectWithDomainComponent : NonPersistentBaseObject {}
[DomainComponent]
public class NonPersistentLiteObjectWithDomainComponent : NonPersistentLiteObject {}
}
#How to Fix
Decorate the NonPersistentBaseObject
and NonPersistentLiteObject
descendants with the DomainComponentAttribute
See Also