Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Collapse]Cross-Platform Core Libraries
 [Expand]DevExpress ORM Tool
 [Expand]DevExpress Data Library
 [Expand]Miscellaneous
 [Collapse]API Reference
  [Expand]DevExpress.Data
  [Expand]DevExpress.Data.Browsing
  [Expand]DevExpress.Data.Browsing.Design
  [Expand]DevExpress.Data.Camera
  [Expand]DevExpress.Data.Controls.ExpressionEditor
  [Expand]DevExpress.Data.Entity
  [Expand]DevExpress.Data.Filtering
  [Expand]DevExpress.Data.Filtering.Exceptions
  [Expand]DevExpress.Data.Filtering.Helpers
  [Expand]DevExpress.Data.Linq
  [Expand]DevExpress.Data.ODataLinq
  [Expand]DevExpress.Data.PivotGrid
  [Expand]DevExpress.Data.PLinq
  [Expand]DevExpress.Data.TreeList
  [Expand]DevExpress.Data.Utils.ServiceModel
  [Expand]DevExpress.Data.WcfLinq
  [Expand]DevExpress.Data.WizardFramework
  [Expand]DevExpress.Data.XtraReports.DataProviders
  [Expand]DevExpress.Data.XtraReports.Labels
  [Expand]DevExpress.Data.XtraReports.ServiceModel
  [Expand]DevExpress.Data.XtraReports.ServiceModel.DataContracts
  [Expand]DevExpress.Data.XtraReports.Wizard
  [Expand]DevExpress.Data.XtraReports.Wizard.Presenters
  [Expand]DevExpress.Data.XtraReports.Wizard.Views
  [Expand]DevExpress.DataAccess
  [Expand]DevExpress.DataAccess.ConnectionParameters
  [Expand]DevExpress.DataAccess.EntityFramework
  [Expand]DevExpress.DataAccess.Excel
  [Expand]DevExpress.DataAccess.ExpressionEditor
  [Expand]DevExpress.DataAccess.Localization
  [Expand]DevExpress.DataAccess.ObjectBinding
  [Expand]DevExpress.DataAccess.Sql
  [Expand]DevExpress.DataAccess.Sql.DataApi
  [Expand]DevExpress.DataAccess.UI.Design
  [Expand]DevExpress.DataAccess.UI.EntityFramework
  [Expand]DevExpress.DataAccess.UI.Excel
  [Expand]DevExpress.DataAccess.UI.Localization
  [Expand]DevExpress.DataAccess.UI.ObjectBinding
  [Expand]DevExpress.DataAccess.UI.Sql
  [Expand]DevExpress.DataAccess.UI.Wizard
  [Expand]DevExpress.DataAccess.UI.Wizard.Services
  [Expand]DevExpress.DataAccess.UI.Wizard.Views
  [Expand]DevExpress.DataAccess.Web
  [Expand]DevExpress.DataAccess.Wizard
  [Expand]DevExpress.DataAccess.Wizard.Model
  [Expand]DevExpress.DataAccess.Wizard.Presenters
  [Expand]DevExpress.DataAccess.Wizard.Services
  [Expand]DevExpress.DataAccess.Wizard.Views
  [Expand]DevExpress.Diagram.Core
  [Expand]DevExpress.Diagram.Core.Layout
  [Expand]DevExpress.Diagram.Core.Localization
  [Expand]DevExpress.Diagram.Core.Themes
  [Expand]DevExpress.DocumentServices.ServiceModel
  [Expand]DevExpress.DocumentServices.ServiceModel.Client
  [Expand]DevExpress.DocumentServices.ServiceModel.DataContracts
  [Expand]DevExpress.DocumentView
  [Expand]DevExpress.Entity.Model
  [Expand]DevExpress.Entity.ProjectModel
  [Expand]DevExpress.Export
  [Expand]DevExpress.Export.Xl
  [Expand]DevExpress.Map
  [Expand]DevExpress.Mvvm
  [Expand]DevExpress.Mvvm.DataAnnotations
  [Expand]DevExpress.Mvvm.DataModel
  [Expand]DevExpress.Mvvm.ModuleInjection
  [Expand]DevExpress.Mvvm.UI
  [Expand]DevExpress.Mvvm.Utils
  [Expand]DevExpress.Mvvm.ViewModel
  [Expand]DevExpress.Office
  [Expand]DevExpress.Office.Crypto
  [Expand]DevExpress.Office.Drawing
  [Expand]DevExpress.Office.Export
  [Expand]DevExpress.Office.Export.Html
  [Expand]DevExpress.Office.Import
  [Expand]DevExpress.Office.Localization
  [Expand]DevExpress.Office.Options
  [Expand]DevExpress.Office.Services
  [Expand]DevExpress.Office.Utils
  [Expand]DevExpress.Pdf
  [Expand]DevExpress.Pdf.Localization
  [Expand]DevExpress.PivotGrid.Printing
  [Expand]DevExpress.Printing.Core
  [Expand]DevExpress.ReportServer.Printing
  [Expand]DevExpress.ReportServer.Printing.Services
  [Expand]DevExpress.ReportServer.ServiceModel.Client
  [Expand]DevExpress.ReportServer.ServiceModel.ConnectionProviders
  [Expand]DevExpress.ReportServer.ServiceModel.DataContracts
  [Expand]DevExpress.Schedule
  [Expand]DevExpress.Services
  [Expand]DevExpress.Sparkline
  [Expand]DevExpress.Spreadsheet
  [Expand]DevExpress.Spreadsheet.Charts
  [Expand]DevExpress.Spreadsheet.Drawings
  [Expand]DevExpress.Spreadsheet.Export
  [Expand]DevExpress.Spreadsheet.Formulas
  [Expand]DevExpress.Spreadsheet.Functions
  [Expand]DevExpress.TreeMap
  [Expand]DevExpress.Utils
  [Expand]DevExpress.Utils.Commands
  [Expand]DevExpress.Utils.Controls
  [Expand]DevExpress.Utils.IoC
  [Expand]DevExpress.Utils.Localization
  [Expand]DevExpress.Utils.Serializing.Helpers
  [Expand]DevExpress.WebUtils
  [Expand]DevExpress.Xpf.Core
  [Expand]DevExpress.Xpf.Printing
  [Collapse]DevExpress.Xpo
   [Expand]AggregatedAttribute Class
   [Expand]AssociationAttribute Class
    AsyncCommitCallback Delegate
    AsyncSelectDataCallback Delegate
    CacheBehavior Enumeration
    CollectionBindingBehavior Enumeration
   [Expand]CommitObjectStubsResult Class
   [Expand]CustomAttribute Class
   [Expand]CustomCriteriaManager Class
   [Expand]DataViewPropertiesCollection Class
   [Expand]DataViewProperty Class
   [Expand]DataViewRecord Class
   [Expand]DbTypeAttribute Class
    DefaultMembersPersistence Enumeration
   [Expand]DefaultMembersPersistenceAttribute Class
   [Expand]DeferredDeletionAttribute Class
   [Expand]DelayedAttribute Class
   [Expand]DisplayNameAttribute Class
   [Expand]ExplicitLoadingAttribute Class
   [Expand]ExplicitUnitOfWork Class
   [Expand]GetObjectStubsByKeyQuery Class
    GuidGenerationMode Enumeration
   [Expand]HiddenAttribute Class
   [Expand]ICustomCriteriaOperatorQueryable Interface
   [Expand]ICustomFunctionOperatorQueryable Interface
   [Expand]IDataLayer Interface
    IdentityMapBehavior Enumeration
   [Expand]IndexedAttribute Class
   [Expand]IndicesAttribute Class
   [Expand]IObjectLayer Interface
   [Expand]IObjectLayerEx Interface
   [Expand]IObjectLayerOnSession Interface
   [Expand]ISerializableObjectLayer Interface
   [Expand]ISerializableObjectLayerEx Interface
   [Expand]IXPModificationsStore Interface
   [Expand]IXPObject Interface
   [Expand]IXPSimpleObject Interface
   [Expand]KeyAttribute Class
   [Expand]LoadDataMemberOrderItem Structure
    LockingOption Enumeration
   [Expand]MapInheritanceAttribute Class
    MapInheritanceType Enumeration
   [Expand]MapToAttribute Class
   [Expand]MemberDesignTimeVisibilityAttribute Class
   [Expand]NestedUnitOfWork Class
   [Expand]NoForeignKeyAttribute Class
   [Expand]NonPersistentAttribute Class
   [Expand]NullValueAttribute Class
   [Expand]ObjectChangeEventArgs Class
    ObjectChangeEventHandler Delegate
    ObjectChangeReason Enumeration
   [Expand]ObjectManipulationEventArgs Class
    ObjectManipulationEventHandler Delegate
   [Expand]ObjectsByKeyQuery Class
   [Expand]ObjectsManipulationEventArgs Class
    ObjectsManipulationEventHandler Delegate
   [Expand]ObjectsQuery Class
   [Expand]ObjectStubsQuery Class
   [Expand]OptimisticLockingAttribute Class
    OptimisticLockingBehavior Enumeration
   [Expand]OptimisticLockingIgnoredAttribute Class
    OptimisticLockingReadBehavior Enumeration
   [Expand]OptimisticLockingReadBehaviorAttribute Class
    OptimisticLockingReadMergeBehavior Enumeration
   [Collapse]PersistentAliasAttribute Class
     PersistentAliasAttribute Members
     PersistentAliasAttribute Constructor
    [Expand]PersistentAliasAttribute Properties
   [Expand]PersistentAttribute Class
   [Expand]PersistentBase Class
    PersistentCriteriaEvaluationBehavior Enumeration
   [Expand]ResolveSessionEventArgs Class
    ResolveSessionEventHandler Delegate
   [Expand]SchemaInitEventArgs Class
    SchemaInitEventHandler Delegate
   [Expand]SerializableObjectLayer Class
   [Expand]SerializableObjectLayerClient Class
    ServerExceptionThrownAction Enumeration
   [Expand]ServerExceptionThrownEventArgs Class
    ServerExceptionThrownEventHandler Delegate
   [Expand]Session Class
   [Expand]SessionManipulationEventArgs Class
    SessionManipulationEventHandler Delegate
   [Expand]SessionObjectLayer Class
   [Expand]SessionOperationFailEventArgs Class
    SessionOperationFailEventHandler Delegate
   [Expand]SimpleDataLayer Class
   [Expand]SimpleObjectLayer Class
   [Expand]SizeAttribute Class
   [Expand]SkipCheckForFeedsAttribute Class
    SortDirection Enumeration
   [Expand]SortingCollection Class
   [Expand]SortProperty Class
   [Expand]StreamAttribute Class
   [Expand]ThreadSafeDataLayer Class
   [Expand]UnitOfWork Class
   [Expand]ValueConverterAttribute Class
   [Expand]ViewPropertiesCollection Class
   [Expand]ViewProperty Class
   [Expand]ViewRecord Class
   [Expand]VisibleAttribute Class
   [Expand]XPBaseCollection Class
   [Expand]XPBaseObject Class
   [Expand]XPClassInfoStub Class
   [Expand]XPCollection Class
   [Expand]XPCollection<T> Class
   [Expand]XPCollectionChangedEventArgs Class
    XPCollectionChangedEventHandler Delegate
    XPCollectionChangedType Enumeration
   [Expand]XPCursor Class
   [Expand]XPCustomObject Class
   [Expand]XPDataObject Class
   [Expand]XPDataView Class
   [Expand]XPDelayedProperty Class
   [Expand]XPDictionaryStub Class
   [Expand]XPInstantFeedbackSource Class
   [Expand]XPLiteObject Class
   [Expand]XPObject Class
   [Expand]XPObjectStub Class
   [Expand]XPObjectStubCollection Class
   [Expand]XPObjectType Class
   [Expand]XpoDataSource Class
   [Expand]XpoDataSourceInsertedEventArgs Class
    XpoDataSourceInsertedEventHandler Delegate
   [Expand]XpoDefault Class
   [Expand]XPPageSelector Class
   [Expand]XPQuery<T> Class
   [Expand]XPQueryBase Class
   [Expand]XPQueryExtensions Class
   [Expand]XPServerCollectionSource Class
   [Expand]XPView Class
   [Expand]XPWeakReference Class
  [Expand]DevExpress.Xpo.DB
  [Expand]DevExpress.Xpo.DB.Exceptions
  [Expand]DevExpress.Xpo.DB.Helpers
  [Expand]DevExpress.Xpo.Exceptions
  [Expand]DevExpress.Xpo.Helpers
  [Expand]DevExpress.Xpo.Metadata
  [Expand]DevExpress.XtraCharts
  [Expand]DevExpress.XtraCharts.Localization
  [Expand]DevExpress.XtraCharts.Printing
  [Expand]DevExpress.XtraEditors
  [Expand]DevExpress.XtraEditors.DXErrorProvider
  [Expand]DevExpress.XtraExport.Csv
  [Expand]DevExpress.XtraGauges.Base
  [Expand]DevExpress.XtraGauges.Core
  [Expand]DevExpress.XtraGauges.Core.Base
  [Expand]DevExpress.XtraGauges.Core.Drawing
  [Expand]DevExpress.XtraGauges.Core.Localization
  [Expand]DevExpress.XtraGauges.Core.Model
  [Expand]DevExpress.XtraGauges.Core.Primitive
  [Expand]DevExpress.XtraGrid
  [Expand]DevExpress.XtraPivotGrid
  [Expand]DevExpress.XtraPivotGrid.Customization
  [Expand]DevExpress.XtraPivotGrid.Data
  [Expand]DevExpress.XtraPivotGrid.Localization
  [Expand]DevExpress.XtraPivotGrid.Selection
  [Expand]DevExpress.XtraPrinting
  [Expand]DevExpress.XtraPrinting.BarCode
  [Expand]DevExpress.XtraPrinting.DataNodes
  [Expand]DevExpress.XtraPrinting.Drawing
  [Expand]DevExpress.XtraPrinting.Export
  [Expand]DevExpress.XtraPrinting.Export.Web
  [Expand]DevExpress.XtraPrinting.Localization
  [Expand]DevExpress.XtraPrinting.Native
  [Expand]DevExpress.XtraPrinting.Shape
  [Expand]DevExpress.XtraPrinting.Shape.Native
  [Expand]DevExpress.XtraPrinting.WebClientUIControl.DataContracts
  [Expand]DevExpress.XtraPrinting.XamlExport
  [Expand]DevExpress.XtraPrintingLinks
  [Expand]DevExpress.XtraReports
  [Expand]DevExpress.XtraReports.Design
  [Expand]DevExpress.XtraReports.Parameters
  [Expand]DevExpress.XtraReports.ReportGeneration
  [Expand]DevExpress.XtraReports.UI
  [Expand]DevExpress.XtraRichEdit
  [Expand]DevExpress.XtraRichEdit.API.Layout
  [Expand]DevExpress.XtraRichEdit.API.Native
  [Expand]DevExpress.XtraRichEdit.API.Native.Implementation
  [Expand]DevExpress.XtraRichEdit.Commands
  [Expand]DevExpress.XtraRichEdit.Export
  [Expand]DevExpress.XtraRichEdit.Export.Html
  [Expand]DevExpress.XtraRichEdit.Export.Rtf
  [Expand]DevExpress.XtraRichEdit.Forms
  [Expand]DevExpress.XtraRichEdit.Import
  [Expand]DevExpress.XtraRichEdit.Localization
  [Expand]DevExpress.XtraRichEdit.Services
  [Expand]DevExpress.XtraRichEdit.Utils
  [Expand]DevExpress.XtraScheduler
  [Expand]DevExpress.XtraScheduler.Compatibility
  [Expand]DevExpress.XtraScheduler.Drawing
  [Expand]DevExpress.XtraScheduler.Exchange
  [Expand]DevExpress.XtraScheduler.iCalendar
  [Expand]DevExpress.XtraScheduler.iCalendar.Components
  [Expand]DevExpress.XtraScheduler.Localization
  [Expand]DevExpress.XtraScheduler.Native
  [Expand]DevExpress.XtraScheduler.Outlook
  [Expand]DevExpress.XtraScheduler.Outlook.Interop
  [Expand]DevExpress.XtraScheduler.Reporting
  [Expand]DevExpress.XtraScheduler.Services
  [Expand]DevExpress.XtraScheduler.Services.Implementation
  [Expand]DevExpress.XtraScheduler.Tools
  [Expand]DevExpress.XtraScheduler.UI
  [Expand]DevExpress.XtraScheduler.Xml
  [Expand]DevExpress.XtraSpellChecker
  [Expand]DevExpress.XtraSpreadsheet
  [Expand]DevExpress.XtraSpreadsheet.Export
  [Expand]DevExpress.XtraSpreadsheet.Export.Html
  [Expand]DevExpress.XtraSpreadsheet.Import
  [Expand]DevExpress.XtraSpreadsheet.Localization
  [Expand]DevExpress.XtraSpreadsheet.Services
[Expand]Tools and Utilities
[Expand]End-User Documentation

PersistentAliasAttribute Class

Indicates that a property is not persistent and its value is calculated based upon the values of a specific field(s).

Namespace:DevExpress.Xpo
Assembly:DevExpress.Xpo.v17.1.dll

Expanded Syntax

Expanded Remarks

The expression to be evaluated can be passed as the constructor's parameter or specified via the AliasExpression property. You can use both persistent and non-persistent fields to specify the expressions. The expression is evaluated at the server side when only persistent properties are used. When a non-persistent property is referred, XPO extracts a persistent part from an expression, sends it to the database server, and processes the rest on the client. Note that this is only possible when an operation involves object loading and won't work in XPView.

Expanded Example

The following code shows how to define a property as non-persistent and calculate its value based upon the values of specific persistent fields. The 'ExtendedPrice' property is marked as a non-persistent, using the PersistentAliasAttribute attribute. The expression to evaluate the property's value is specified as the attribute's parameter. In addition, the property's getter evaluates this expression using the XPBaseObject.EvaluateAlias method.

Note that while a criteria expression can return an object reference, this is not supported in all scenarios. Returning an object reference by directly referencing a property, as in the following code snippet, is fully supported.

In this code snippet, a Part object referenced by the Part or MyCustOrderLine.Part property will be returned correctly. However, retrieving reference properties from function and aggregation operators is not supported. So, the following persistent alias declaration will not work.

Expanded Example

The following example shows how to apply the PersistentAliasAttribute to the DefaultAddress property. When initializing a new instance of the PersistentAliasAttribute class, the name of the field which stores the DefaultAddress property's value is specified. The mDefaultAddress field has the PersistentAttribute whose PersistentAttribute.MapTo property holds the name of the column in the data store where the field's value is stored.

Expanded Inheritance Hierarchy

System.Object
    System.Attribute
       PersistentAliasAttribute

Expanded See Also

How would you rate this topic?​​​​​​​