Пример #1
0
        public ActionResult AtualizaPermissaoPerfil([FromHeader] string ibge, [FromBody] List <ParamPermissaoPerfilViewModel> model)
        {
            try
            {
                ibge = _configuration.GetConnectionString(Connection.GetConnection(ibge));
                foreach (var item in model)
                {
                    _Repository.AtualizaPermissaoPerfil(ibge, (int)item.permissao, (int)item.id);
                }

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