XPDelayedProperty.IsLoaded Property
Gets whether the property’s value remains unassigned after the persistent object has been loaded from the data store.
Namespace: DevExpress.Xpo
Assembly: DevExpress.Xpo.v24.2.dll
NuGet Package: DevExpress.Xpo
#Declaration
#Property Value
Type | Description |
---|---|
Boolean | true if the property’s value is unassigned after the persistent object has been loaded from the data store; otherwise, false. |
#Remarks
By default, the IsLoaded property is set to false. This means that the property’s value remains unassigned after the persistent object has been loaded from the data store. The property will be loaded the first time it is accessed.
#Example
The following example demonstrates how to delay the loading of the DelayedAttachment property and improve property value update performance, by enabling the DelayedAttribute.UpdateModifiedOnly property.
Note
This solution uses the XPDelayed
using DevExpress.Xpo;
public class Customer : XPObject {
// ...
private XPDelayedProperty document = new XPDelayedProperty();
// Improve update performance for the property's value
// by passing true as the attribute's
// updateModifiedOnly parameter.
[Delayed(nameof(document), true)]
public Byte[] DelayedAttachment {
get { return (Byte[])document.Value; }
set { document.Value = value; }
}
}