public IActionResult UpdateBooking(BookingViewModel booking) { bool IsBookingUpdated; if (!ModelState.IsValid) { return(BadRequest("Invalid data.")); } else { IsBookingUpdated = bookingRequest.UpdateBooking(booking); } if (IsBookingUpdated) { return(Ok()); } else { return(BadRequest("Booking is not UPdated")); } }
public IActionResult OnPost() { _services.UpdateBooking(Booking); return(RedirectToPage("Index")); }