public List <FindCandidateDto> GetCandidates() { List <Candidate> candidate = candidateRepository.FindAll(); List <FindCandidateDto> candidatesDtos = new List <FindCandidateDto>(); foreach (Candidate cat in candidate) { candidatesDtos.Add(TransformModelToDto(cat)); } return(candidatesDtos); }