Added getEntityManager() method in controller