Skip to main content
All docs
V25.1
  • .NET 8.0+

    DevExpress v25.1 Update — Your Feedback Matters

    Our What's New in v25.1 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

    XAF0028: Use the corresponding XPO attribute

    Severity: Warning

    Do not decorate members of an XPO class with attributes from the DevExpress.ExpressApp.DC namespace. These attributes are intended to be used with non-persistent classes only. Use corresponding XPO attributes instead.

    Consider the following popular replacements for XAF ORM-agnostic attributes in XPO classes:

    Attribute Replacement
    DevExpress.ExpressApp.Data.KeyAttribute DevExpress.Xpo.KeyAttribute
    DevExpress.ExpressApp.DC.FieldSizeAttribute DevExpress.Xpo.SizeAttribute
    DevExpress.ExpressApp.DC.AggregatedAttribute DevExpress.Xpo.AggregatedAttribute
    DevExpress.ExpressApp.DC.CalculatedAttribute DevExpress.Xpo.PersistentAliasAttribute

    #Examples

    #Invalid Code

    C#
    using DevExpress.Xpo;
    
    namespace TestApplication.Module.BusinessObjects {
        public class TestClass : XPObject {
            [DevExpress.ExpressApp.DC.FieldSize(1000)]
            public string Description { get; set; }
        }
    }
    

    #Valid Code

    C#
    using DevExpress.Xpo;
    
    namespace TestApplication.Module.BusinessObjects {
        public class TestClass : XPObject {
            public TestClass(Session session) : base(session) { }
            [Size(1000)]
            public string Description { get; set; }
        }
    }