public async Task <IActionResult> PostAsync(BookingCreateModel value) { try { await bookingService.AddBookingAsync(value); return(Ok()); } catch (Exception ex) { throw ex; } }
public async Task <IActionResult> AddBooking(Guid hotelId, BookingForAddOrUpdateDto bookingToAdd) { var booking = await _bookingService.AddBookingAsync(hotelId, bookingToAdd); return(CreatedAtAction(nameof(GetBookingById), new { hotelId = booking.HotelId, id = booking.Id }, booking)); }