Skip to main content
.NET Standard 2.0+

NonPersistentAttribute Class

Indicates that a class, property, or field will not be stored in a persistent data store.

Namespace: DevExpress.Xpo

Assembly: DevExpress.Xpo.v22.1.dll

Declaration

[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Interface)]
public sealed class NonPersistentAttribute :
    Attribute

Remarks

Apply the NonPersistentAttribute attribute to a property or class if you don’t want to store its data that is persistent by default.

[NonPersistent]
public class MyBusinessObject : XPObject {
   //...
}

The NonPersistentAttribute is not inherited by derived classes.

Important

Do not use the NonPersistentAttribute to make a class non-persistent in eXpressApp Framework applications. Instead, apply the DomainComponentAttribute to a POCO class, as demonstrated in the Non-Persistent Objects topic in XAF documentation.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the NonPersistentAttribute class.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

Inheritance

Object
Attribute
NonPersistentAttribute
See Also