Reducing dependency on RepositoryFactory by providing EntityManager as a getRepository argument.