public BookingEvent GetBookingEventById(long id)
        {
            BookingEvent e = EventRepo.Query(a => a.Id == id).FirstOrDefault();

            EventRepo.LoadIfNot(e.Schedules);

            return(e);
        }
 public List <E.BookingEvent> GetAllEventByTimePeriod(DateTime startDate, DateTime endDate)
 {
     return(EventRepo.Query(a => ((DateTime)a.MinDate >= startDate && (DateTime)a.MinDate <= endDate) || ((DateTime)a.MaxDate >= startDate && (DateTime)a.MaxDate <= endDate) || (DateTime)a.MinDate <= startDate && (DateTime)a.MaxDate >= endDate).ToList());
 }
 public List <E.BookingEvent> GetAllEventByTimePeriod(DateTime startDate)
 {
     return(EventRepo.Query(a => (DateTime)a.MaxDate >= startDate).ToList());
 }
 public IQueryable <E.BookingEvent> GetAllBookingEvents()
 {
     return(EventRepo.Query());
 }