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

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