// GET: api/Candidato
 public IHttpActionResult Get()
 {
     try
     {
         var response = _candidatoRepositorio.GetAll();
         return(Ok(response));
     }
     catch (Exception ex)
     {
         return(BadRequest($"Ops! algo deu errado! Erro: {ex.Message}"));
     }
 }
Exemple #2
0
 public IEnumerable <Candidato> GetAll()
 {
     return(_candidatoRepositorio.GetAll());
 }