// 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}")); } }
public IEnumerable <Candidato> GetAll() { return(_candidatoRepositorio.GetAll()); }