The Entity Context
Hibernate Session, EDM ObjectContext, seen as “session”
and “context” variables in previous code.
Belongs to one thread as its object cache, usually for one
transaction lifetime, one request-response cycle.
Usually defers updates to the database to end of transaction
Ensures only one entity object for each id
As a cache, avoids rereads of database, preventing some
repeated-read anomalies if running at lower isolation level.
Caching: the database itself has the definitive cache, global to
all apps using it…