コード例 #1
0
        public ActionResult Delete(ViewModels.Reservation model, int id)
        {
            Domain.Reservation reservation = reservationRepository.GetById(id);

            reservationServices.DeleteReservation(reservation);
            return(RedirectToAction("Index"));
        }
コード例 #2
0
        public IActionResult Delete(DeleteReservationViewModel deleteReservation)
        {
            bool result = reservationServices.DeleteReservation(deleteReservation);

            if (!result)
            {
                return(View(deleteReservation));
            }
            else
            {
                return(Redirect("/"));
            }
        }