public async Task <ActionResult> DeleteTaxiReservation([FromRoute] long taxiReservationId) { var taxiRes = taxiReservationService.FindTaxiReservationByIdAsync(taxiReservationId); if (taxiReservationId == 0 || taxiRes == null) { return(BadRequest("There is no taxireservation that can be deleted")); } else { await taxiReservationService.DeleteTaxiReservationByIdAsync(taxiReservationId); return(StatusCode(200)); } }
public async Task<IActionResult> CancelTaxiReservation(long taxiReservationId) { await taxiReservationService.DeleteTaxiReservationByIdAsync(taxiReservationId); return RedirectToAction(nameof(ReservationController.MyReservation), "Reservation"); }