Example #1
0
 public ActionResult <List <ACSViewModel> > GetACSByEstabelecimentoSaude([FromHeader] string ibge, [FromRoute] int id)
 {
     try
     {
         ibge = _config.GetConnectionString(Connection.GetConnection(ibge));
         List <ACSViewModel> agentes_saude = _profissionalRepository.GetACSByEstabelecimentoSaude(ibge, id);
         return(Ok(agentes_saude));
     }
     catch (Exception ex)
     {
         var response = TrataErro.GetResponse(ex.Message, true);
         return(StatusCode((int)HttpStatusCode.InternalServerError, response));
     }
 }