Skip to main content
.NET 6.0+

BaseObjectSpace.Delete(Object) Method

Marks the specified persistent object and its aggregated objects as deleted from persistent storage.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v24.1.dll

NuGet Package: DevExpress.ExpressApp

Declaration

public void Delete(
    object obj
)

Parameters

Name Type Description
obj Object

An object that is the persistent object to be deleted.

Remarks

Use this method to delete the object specified as the obj parameter from the database. This method calls a protected virtual method, DeleteCore, which must be overridden in the BaseObjectSpace class descendants. Note that the object cannot be deleted immediately. The BaseObjectSpace.SetModified method is called so that the deleted object is marked as modified, and therefore, is deleted from the database during the next changes commit (see BaseObjectSpace.CommitChanges).

You can implement a custom delete operation instead of the one performed by the DeleteCore method. To do this, subscribe to the BaseObjectSpace.CustomDeleteObjects event and set the event handler’s Handled parameter to true.

Implements

See Also