EntityContextGenerator and EntityContext