示例#1
0
文件: Room.cs 项目: yves982/Resotel
 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));
 }
示例#2
0
文件: Room.cs 项目: yves982/Resotel
 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));
 }