Skip to main content
.NET Framework 4.5.2+

XPDelayedProperty.IsModified Property

Gets the property value’s modified status.

Namespace: DevExpress.Xpo

Assembly: DevExpress.Xpo.v24.1.dll

NuGet Package: DevExpress.Xpo

Declaration

public bool IsModified { get; }

Property Value

Type Description
Boolean

true if the property value has been modified since the last load; otherwise, false.

Remarks

If the DelayedAttribute.UpdateModifiedOnly property is set to true for a delayed property, the property’s value is saved to a data store only if the IsModified property is set to true.

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 XPDelayedProperty object explicitly and doesn’t raise property change notifications in all scenarios. You may need to explicitly call the Session.Save method after modifying the property value to save changes. Alternatively, implement the delayed property as shown in the Delayed Loading article.

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; }
   }
}
See Also