コード例 #1
0
        public BookingViewModel Add(BookingViewModel bookingViewModel)
        {
            var booking = Mapper.Map <Booking>(bookingViewModel);

            booking.Activate();

            var bookingRet = _bookingService.AddNewBooking(booking);

            if (bookingRet.validationResult.IsValid)
            {
                if (!Commit())
                {
                }
            }

            return(bookingViewModel = Mapper.Map <BookingViewModel>(bookingRet));
        }