Esempio n. 1
0
        public IList <Booking> GetBookings(DateTime from, DateTime to)
        {
            var bookings = new DbBookingDao().GetBookings(from, to);
            var eventDao = new DbEventDao();

            foreach (var booking in bookings)
            {
                booking.Event = eventDao.GetBy(booking.EventId.Value);
            }

            return(bookings);
        }
Esempio n. 2
0
        public IList <Booking> GetUpcomingBookingsFor(DateTime date)
        {
            var bookings = new DbBookingDao().GetUpcomingBookings(date);
            var eventDao = new DbEventDao();

            foreach (var booking in bookings)
            {
                booking.Event = eventDao.GetBy(booking.EventId.Value);
            }

            return(bookings);
        }