Beispiel #1
0
 public ActionResult <ProfissionalViewModel> GetProfissionalByUnidades([FromHeader] string ibge, string id)
 {
     try
     {
         ibge = _config.GetConnectionString(Connection.GetConnection(ibge));
         List <ProfissionalViewModel> lista = new List <ProfissionalViewModel>();
         if (!string.IsNullOrWhiteSpace(id))
         {
             lista = _profissionalRepository.GetProfissionalByUnidades(ibge, id);
         }
         return(Ok(lista));
     }
     catch (Exception ex)
     {
         var response = TrataErro.GetResponse(ex.Message, true);
         return(StatusCode((int)HttpStatusCode.InternalServerError, response));
     }
 }