public ActionResult Edit(int id, Walk walk) { try { walk.WalkStatusId = 3; _walkRepo.UpdateWalk(walk); return(RedirectToAction(nameof(Index), "Walkers")); } catch { walk = _walkRepo.GetWalkById(id); return(View(walk)); } }
public IActionResult Update(Walk w) { Walk w2 = repository.UpdateWalk(w); return(RedirectToAction("Detail", "Dog", new { id = w.DogId })); }