EntityDAC

TCustomObjectContext

A basic class that provides the data context functionality.

Unit

Syntax

Remarks

The TCustomObjectContext class provides functionality for managing an entity life cycle in the application. It provides methods for creating and initializing new entity instances, retrieving and storing entities from/to the database, storing used entities in the cache for future use, destroying of unused entities.

The TCustomObjectContext functionality is identical to the TCustomEntityContext class. The main difference is that TCustomEntityContext is designed to manage entities which are the TEntity class descendants, and it is used when working with code-mapped entities, Attribute-mapped entities or XML-mapped entities. TCustomObjectContext is designed to manage entities which are the TObject descendants, and it is used when working with A:attribute-mapped-objects.

Since TCustomObjectContext is a basic class, it should not be used directly. Instead, TCustomObjectContext descendants such as TObjectContext have to be used.

See Also

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