.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

Session.PurgeDeletedObjects(IObjectLayer) Method

Deletes the objects marked as deleted from a storage.

Namespace: DevExpress.Xpo

Assembly: DevExpress.Xpo.v21.2.dll


public static PurgeResult PurgeDeletedObjects(
    IObjectLayer objectLayer


Name Type Description
objectLayer IObjectLayer

An object which implements the IObjectLayer interface.


Type Description

A PurgeResult value that specifies the result of the operation.


This method will delete the objects that are marked as deleted and if they are not referenced by other objects. To remove objects, the PurgeDeletedObjects method calls the objectLayer‘s IObjectLayer.Purge method implementation.


We recommend that you do not use the PurgeDeletedObjects method in your workflow. We suggest that you create a separate tool for database maintenance. This tool can be used to create/update the database schema, and to purge deleted objects.

See Also