public IActionResult BookRoom(HotelRoomBookingModel bookingDetails) { var userIdClaim = User.FindFirst(ClaimTypes.NameIdentifier)?.Value; if (!int.TryParse(userIdClaim, out var userId)) { throw new InvalidClaimException(); } bookingDetails.UserId = userId; _hotelService.BookRoom(bookingDetails); return(Ok()); }