Ejemplo n.º 1
0
 private static Expression <Func <Room, bool> > _bookingsEndedBefore(DateTime start)
 {
     return(room => !room.Bookings.AsQueryable()
            .Where(Booking.IsNotFullyCancelled())
            .Where(Booking.IsNotCancelled())
            .Any(booking => SqlFunctions.DateDiff("day", booking.Dates.End, start) < 0));
 }
Ejemplo n.º 2
0
 private static Expression <Func <Room, bool> > _bookingsStartedAfter(DateTime end)
 {
     return(room => !room.Bookings.AsQueryable()
            .Where(Booking.IsNotFullyCancelled())
            .Where(Booking.IsNotCancelled())
            .Any(booking => SqlFunctions.DateDiff("day", booking.Dates.Start, end) > 0));
 }