[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)

Deleting Persistent Objects

The eXpress Persistent Objects library supports deferred and immediate object deletion. Deferred deletion means that XPO does not physically delete the record in the underlying data store when the corresponding persistent object is deleted. Instead, it marks the record as deleted. This avoids database constraint exceptions when deleting related objects. Deleted objects can be restored later.

Immediate object deletion is an alternative to deferred deletion. The record in the underlying data store is deleted immediately after the object has been deleted. When deleting related objects, you should clear all references to the object and then delete it. Otherwise, you will get an exception.

Expanded Concepts

Expanded Member Table

Expanded Task-Based Help

Expanded Online Knowledge Base

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