public IActionResult AddCategory(AddCategoryVM model) { if (!ModelState.IsValid) { return(View(model)); } context.AddNewCategory(model); return(RedirectToAction(nameof(Index))); }
public IActionResult AddCategory(AddCategoryVM model) { if (!ModelState.IsValid) { return(View(model)); } context.AddNewCategory(model); return(RedirectToAction(nameof(Index))); }