[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Collapse]eXpress Persistent Objects
 [Expand]Product Information
 [Expand]Getting Started
 [Collapse]Feature Center
  [Expand]Data Representation
  [Expand]Object Relational Mapping
  [Expand]Connecting to a Data Store
  [Collapse]Data Exchange and Manipulation
    Delayed Loading
    Deleting Persistent Objects
    Optimistic Concurrency
    Persisting Objects
    Processing Transactions
    Validating Objects
  [Expand]Querying a Data Store
  [Expand]Using XPO in Web Applications
 [Expand]Design-Time Features
 [Expand]Member Tables
 [Expand]API Reference
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Delayed Loading

By default, all properties and fields are restored from a data store when a persistent object is loaded. To improve application performance, the delayed loading feature can be used. This feature allows loading of particular properties, which are rarely used or contain large amounts of data (e.g. images, large memos, or binary data), to be delayed. A property marked for delayed loading will be loaded the first time it is accessed.

To delay the loading of a property, apply the DelayedAttribute to it, and use the GetDelayedPropertyValue and SetDelayedPropertyValue methods in this property getter and setter.

For your convenience, the methods in a delayed property's getter and setter shown above automatically create an XPDelayedProperty behind the scenes, to store the property's value.

To further improve performance when using a delayed property, you can ensure that it saves only modified values to a data store. This allows you to avoid sending the delayed property's values for update once a persistent object is saved, which is done by default for all the object's properties (including delayed properties). To enable saving only modified property values (which is disabled by default), pass true as the DelayedAttribute.UpdateModifiedOnly parameter, as shown below:

Delayed properties can be grouped. All properties in a group are loaded simultaneously when any property is accessed for the first time. To associate a property with a group, assign the group's name via the DelayedAttribute.GroupName parameter. This does not affect properties whose type is a persistent class - delayed referenced objects are always loaded separately.


  • Use the DelayedAttribute only with properties. Persistent members declared as fields do not support delayed loading.

  • You do not need to use the DelayedAttribute with XPCollections, because they always employ delayed loading. XPCollections are populated on demand.

Expanded Task-Based Help

Is this topic helpful?​​​​​​​