EntityDAC

TCustomEntityContext.DeleteAndSave Method

The method is designed for permanent deleting an entity.

Class

TCustomEntityContext

Syntax

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

Parameters
Entity
The entity to be deleted.
Cascade
The parameter defines whether to perform cascade premanent 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 irreversible. When the method is performed, references to the entity are deleted from linked entities, the entity is deleted from collections of linked entities, physical deletion of data from corresponding database structures occurs as well. The method execution is equivalent to consequent execution of the methods: TCustomEntityContext.Delete, TCustomEntityContext.Save

See Also

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