EntityDAC

TCustomEntityContext.Delete Method

The method is designed for deleting an entity.

Class

TCustomEntityContext

Syntax

procedure Delete(Entity: TMappedEntity; Cascade: boolean = False);

Parameters
Entity
The entity to be deleted.
Cascade
The parameter defines whether to perform cascade deletion of entity references and linked collections when deleting the entity. The default value is False.

Remarks

The method deletes the specified entity. The performed deletion is recoverable. When the method is performed, references to the entity are not deleted from linked entities, the entity is not deleted from collections of linked objects. Physical deletion of data from corresponding database structures doesn't occur as well.

To cancel entity deletion, the TCustomEntityContext.Cancel method is used.

To submit entity deletion, the TCustomEntityContext.Save method is used.

To permanently delete an entity, the TCustomEntityContext.DeleteAndSave method is used.

See Also

© 1997-2024 Devart. All Rights Reserved. Request Support DAC Forum Provide Feedback