EntityDAC

TCustomEntityContext.Save Method

The method is designed for saving changes made in an entity instance.

Class

TCustomEntityContext

Syntax

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

Parameters
Entity
The entity instance to be saved.
Cascade
The parameter defines whether to perform cascade saving of changes of entity references and linked collections when saving entity changes. The default value is False.

Remarks

The method performs permanent saving of modifications made in an entity instance. If the entity was deleted with TCustomEntityContext.Delete, then when executing this method, there occurs deletion of references to this entity in linked entities, deletion of the entity from linked entities collections, as well as deletion of data from corresponding database structures.

For irreversible saving of changes of all entities attached to the data context, the TDataContext.SubmitChanges method is used.

See Also

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