[Controller] adds getRepository Function