コード例 #1
0
        public async Task <IActionResult> CreateAsync([FromBody] BookingModel booking)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            var createdBooking = await _bookingService.CreateAsync(booking);

            return(Ok(createdBooking));
        }