XAF0025: Use the corresponding XAF ORM-agnostic or Entity Framework attribute
In This Article
Severity: Warning
Attributes from the DevExpress.Xpo
namespace must not be applied to non-persistent or Entity Framework classes or their properties. Use XAF ORM-agnostic attributes or attributes specific to the target data access technology instead.
Consider the following popular replacements for XPO attributes in non-persistent or Entity Framework classes:
XPO Class | Replacement |
---|---|
DevExpress. |
DevExpress. |
DevExpress. |
DevExpress. |
DevExpress. |
DevExpress. |
DevExpress. |
DevExpress. |
DevExpress. |
System. |
DevExpress. |
DevExpress. |
#Examples
#Invalid Code
C#
using DevExpress.Xpo;
using DevExpress.ExpressApp.DC;
namespace TestApplication.Module.BusinessObjects {
[DomainComponent]
public class TestClass {
[NonPersistent]
public string Name { get; set; }
}
}
#Valid Code
C#
using DevExpress.ExpressApp.DC;
namespace TestApplication.Module.BusinessObjects {
[DomainComponent]
public class TestClass {
public string Name { get; set; }
}
}