Skip to main content
.NET 8.0+

Session.IsObjectToDelete(Object, Boolean) Method

Indicates whether the specified object is deleted in the transaction currently in progress or in any of its parent transaction (optionally).

Namespace: DevExpress.Xpo

Assembly: DevExpress.Xpo.v24.2.dll

Declaration

public virtual bool IsObjectToDelete(
    object theObject,
    bool includeParent
)

Parameters

Name Type Description
theObject Object

The persistent object to test.

includeParent Boolean

true to check whether the persistent object is deleted in the parent transaction(s); otherwise, false.

Returns

Type Description
Boolean

true if the specified object is deleted in the transaction currently in progress or in any of its parent transaction (optionally); otherwise, false.

Remarks

This method indicates whether the specified object is deleted only in the transaction currently in progress. It is overridden in the NestedUnitOfWork class to check parent transactions for the specified object.

To get a collection of persistent objects that are deleted in the transaction currently in progress, use the Session.GetObjectsToDelete method.

For general information on deleting persistent objects, see Deleting Persistent Objects.

See Also