Skip to main content
.NET 6.0+

Session.PurgeDeletedObjects(IObjectLayer) Method

Deletes the objects marked as deleted from a storage.

Namespace: DevExpress.Xpo

Assembly: DevExpress.Xpo.v23.2.dll

NuGet Package: DevExpress.Xpo

Declaration

public static PurgeResult PurgeDeletedObjects(
    IObjectLayer objectLayer
)

Parameters

Name Type Description
objectLayer IObjectLayer

An object which implements the IObjectLayer interface.

Returns

Type Description
DevExpress.Xpo.Helpers.PurgeResult

A PurgeResult value that specifies the result of the operation.

Remarks

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.

Note

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