Пример #1
0
        public IActionResult AddCategory(AddCategoryVM model)
        {
            if (!ModelState.IsValid)
            {
                return(View(model));
            }

            context.AddNewCategory(model);

            return(RedirectToAction(nameof(Index)));
        }