Exemplo n.º 1
0
        public IActionResult AddRule([FromForm] AddRuleViewModel model)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }

            adminsService.AddRule(model.Name, model.Text);
            return(Redirect(Url.Action("Index", "Admins")));
        }