Changing EntityManager to IEntityManager