Inject a repository instead of an entity manager

Matthias Noback