コード例 #1
0
 public ActionResult Delete(int id, Walker walker)
 {
     try
     {
         _walkerRepo.DeleteWalker(id);
         return(RedirectToAction(nameof(Index)));
     }
     catch
     {
         return(View(walker));
     }
 }
コード例 #2
0
 public ActionResult Delete(int id, Walker walker)
 {
     try
     {
         _walkerRepo.DeleteWalker(id);
         return(RedirectToAction("Index"));
     }
     catch (Exception ex)
     {
         return(View(walker));
     }
 }