示例#1
0
        public ActionResult <ProcedimentoAvulso> Inserir([FromHeader] string ibge, [FromBody] ProcedimentoAvulso model)
        {
            try
            {
                ibge = _config.GetConnectionString(Connection.GetConnection(ibge));
                //generator
                var id = _repository.GetNewId(ibge);
                model.csi_controle = id;

                _repository.Inserir(ibge, model);
                return(Ok());
            }
            catch (Exception ex)
            {
                var response = TrataErro.GetResponse(ex.Message, true);
                return(StatusCode((int)HttpStatusCode.InternalServerError, response));
            }
        }