示例#1
0
        public List <Booking> Get(GetAllCafeBookingsRequest request)
        {
            var bookingCtr = new BookingCtr();
            var cafeData   = new Cafe
            {
                ID = request.CafeID,
            };

            return(bookingCtr.GetAllCafeBookings(cafeData));
        }
示例#2
0
        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");
            };
        }