常用方法
常用方法
常用方法
常用方法
public ActionResult Delete(int id) { var reservation = _dataService.GetReservation(id); var model = reservation.ConvertToReservationViewModel(); if (!model.CanDelete()) { throw new Exception("Not allowed"); } _dataService.DeleteReservation(reservation); return(RedirectToAction("Index")); }