Inject the ManagerRegistry instead of the EntityManager

Matthias Noback