Пример #1
0
        public string CampBooking(BookingBussinessEntity bookingBussinessObject)
        {
            Guid   obj = Guid.NewGuid();
            string var = obj.ToString();
            string str = var.Substring(0, 8);

            bookingBussinessObject.ReferenceId = str;



            BookingDataEntity bookingDAL = MapperFromBLtoDA.Mapping <BookingBussinessEntity, BookingDataEntity>(bookingBussinessObject);

            int NumberOfRowsAffected = GetBookingCampDataServices.CreateBooking(bookingDAL);

            //bool result = false;

            if (NumberOfRowsAffected == 0)
            {
                throw new Exception("Something Went Wrong");
            }
            return(bookingBussinessObject.ReferenceId);
        }
Пример #2
0
 public async Task <IActionResult> Create([FromBody] Booking booking) => Ok(await _bookingDataAccess.CreateBooking(booking, UserEmail)); //Temp fix