Exemplo n.º 1
0
        public ActionResult Add(EditVM model)
        {
            if (!ModelState.IsValid)
            {
                return(PartialView("~/Views/Partials/Edits/_EditComment.cshtml", model));
            }

            RulesRepository repo = new RulesRepository();
            Rule            item = new Rule();

            model.PopulateEntity(item);

            repo.Save(item);

            return(Content(""));
        }