inject Registry instead of EntityManager