Updates getRepository function to accept second arg of entity manager name