Пример #1
0
        public ActionResult Create([Bind(Exclude = "Id,Slug")] TagEntity tag)
        {
            if (ModelState.IsValid)
            {
                _tagService.AddTag(tag);
                if (_tagService.Commit())
                {
                    return(RedirectToAction("Index"));
                }

                ModelState.AddModelError("Save", "هنگام ثبت تگ خطایی رخ داده است.");
            }

            return(View(tag));
        }