EntityDAC

TCustomObjectContext Class

A basic class that provides the data context functionality.

For a list of all members of this type, see TCustomObjectContext members.

Unit

EntityDAC.ObjectContext

Syntax

TCustomObjectContext = class(TDataContext);

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.

Inheritance Hierarchy

TCustomContext
   TDataContext
      TCustomObjectContext

See Also

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