public Booking Put(BookingRequestPP request) { var bookingCtr = new BookingCtr(); var cafeData = new Cafe { ID = request.ID }; var bookingData = new Booking { StartDate = request.StartDate, EndDate = request.EndDate, }; bookingCtr.CreateBooking(cafeData, bookingData, request.NoOfPeople); return(null); }
public Booking Post(CreateBookingRequest request) { var bookingCtr = new BookingCtr(); var cafeData = new Cafe { ID = request.CafeID }; var customerData = new Customer { ID = request.PersonID }; var bookingData = new Booking { StartDate = request.StartDate, EndDate = request.EndDate, Customer = customerData }; bookingCtr.CreateBooking(cafeData, bookingData, request.NoOfPeople); return(bookingData); }