public ActionResult Delete(int id, Walker walker) { try { _walkerRepo.DeleteWalker(id); return(RedirectToAction(nameof(Index))); } catch { return(View(walker)); } }
public ActionResult Delete(int id, Walker walker) { try { _walkerRepo.DeleteWalker(id); return(RedirectToAction("Index")); } catch (Exception ex) { return(View(walker)); } }