Skip to main content
All docs
V24.2
.NET Framework 4.6.2+

XAF0027: Do not apply DomainComponentAttribute to the XPO business class

Severity: Warning

Do not apply DomainComponentAttribute to XPO business classes. This attribute must be applied to non-persistent classes only.

Examples

Invalid Code

using DevExpress.Xpo;
using DevExpress.ExpressApp.DC;

namespace TestApplication.Module.BusinessObjects {
    [DomainComponent]
    public class TestClass : XPObject {
        public TestClass(Session session) : base(session) { }
    }
}

Valid Code

using DevExpress.Xpo;

namespace TestApplication.Module.BusinessObjects {
    public class TestClass : XPObject {
        public TestClass(Session session) : base(session) { }
    }
}