public List <Booking> Get(GetAllCafeBookingsRequest request) { var bookingCtr = new BookingCtr(); var cafeData = new Cafe { ID = request.CafeID, }; return(bookingCtr.GetAllCafeBookings(cafeData)); }
public object Get(GetAllCafeBookingsRequest request) { DbBooking dbBooking = new DbBooking(); if (request.CafeId.HasValue) { var booking = dbBooking.GetAllCafeBookings(request.CafeId.Value); return(new BookingResponse { Result = booking }); } else { throw new Exception("Please enter a vaild CafeID"); }; }