Skip to main content
All docs
V24.2
.NET 8.0+

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

XAF0025: Use the corresponding XAF ORM-agnostic or Entity Framework attribute

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.Xpo.KeyAttribute DevExpress.ExpressApp.Data.KeyAttribute
DevExpress.Xpo.SizeAttribute DevExpress.ExpressApp.DC.FieldSizeAttribute
DevExpress.Xpo.DisplayNameAttribute DevExpress.ExpressApp.DC.XafDisplayNameAttribute
DevExpress.Xpo.CustomAttribute DevExpress.ExpressApp.Model.ModelDefaultAttribute
DevExpress.Xpo.MemberDesignTimeVisibilityAttribute System.ComponentModel.BrowsableAttribute
DevExpress.Xpo.PersistentAliasAttribute DevExpress.ExpressApp.DC.CalculatedAttribute

#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; }
    }
}