예제 #1
0
 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));
     }
 }
예제 #2
0
        public IActionResult Update(Walk w)
        {
            Walk w2 = repository.UpdateWalk(w);

            return(RedirectToAction("Detail", "Dog", new { id = w.DogId }));
        }