public ActionResult Delete(ViewModels.Reservation model, int id) { Domain.Reservation reservation = reservationRepository.GetById(id); reservationServices.DeleteReservation(reservation); return(RedirectToAction("Index")); }
public IActionResult Delete(DeleteReservationViewModel deleteReservation) { bool result = reservationServices.DeleteReservation(deleteReservation); if (!result) { return(View(deleteReservation)); } else { return(Redirect("/")); } }