public ActionResult <VacinaApresentacao> Atualizar([FromBody] ParametersVacinaApresentacao model, [FromHeader] string ibge) { try { ibge = _config.GetConnectionString(Connection.GetConnection(ibge)); _vacinaApresentRepository.AtualizarVacinaApresentacao(ibge, model.id, model.descricao, model.quantidade); return(Ok()); } catch (Exception ex) { var response = TrataErro.GetResponse(ex.Message, true); return(StatusCode((int)HttpStatusCode.InternalServerError, response)); } }
public ActionResult <List <VacinaApresentacao> > GetAll([FromQuery] ParametersVacinaApresentacao model, [FromHeader] string ibge) { try { ibge = _config.GetConnectionString(Connection.GetConnection(ibge)); string filtro = string.Empty; List <VacinaApresentacao> lista = _vacinaApresentRepository.GetAll(ibge, filtro); return(Ok(lista)); } catch (Exception ex) { var response = TrataErro.GetResponse(ex.Message, true); return(StatusCode((int)HttpStatusCode.InternalServerError, response)); } }