public Booking GetBookingBy(int id) { var booking = new DbBookingDao().GetBy(id); booking.Event = new DbEventDao().GetBy(booking.EventId.Value); return(booking); }
public Booking GetNewestActiveBooking() { var booking = new DbBookingDao().GetNewestActive(); if (booking != null) { booking.Event = new DbEventDao().GetBy(booking.EventId.Value); } return(booking); }
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); }
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); }