EntityContext error and state