コード例 #1
0
 public ActionResult Edit(Catagory catagory)
 {
     if (ModelState.IsValid)
     {
         _manager.Update(catagory);
         return(RedirectToAction("Index"));
     }
     return(View());
 }
コード例 #2
0
        public IActionResult Edit(Catagory catagory)
        {
            bool isUpdated = _catagoryManager.Update(catagory);

            if (isUpdated)
            {
                return(RedirectToAction("List"));
            }
            return(View(catagory));
        }