예제 #1
0
        public ActionResult EditCategory(Category category)
        {
            if (!ModelState.IsValid)
            {
                return(View(category));
            }

            businessLayer.SaveCategory(category);
            TempData["message"] = string.Format("{0} was successfully updated", category.Name);
            return(RedirectToAction("GetCategories", "Admin"));
        }