public ActionResult InserirCadIndividual([FromHeader] string ibge, [FromBody] Cidadao model) { try { ibge = _config.GetConnectionString(Connection.GetConnection(ibge)); model.csi_codpac = _cidadaoRepository.GetNewId(ibge); //recupera novo id _cidadaoRepository.InsertCadIndividual(ibge, model); return(Ok(model)); } catch (Exception ex) { var response = TrataErro.GetResponse(ex.Message, true); return(StatusCode((int)HttpStatusCode.InternalServerError, response)); } }