public static IQueryable <T> AddDateTimeBetweenFilter <T>(this IQueryable <T> query, DateTime?starTime, DateTime?endTime, Expression <Func <T, DateTime?> > expression) { query = query.AddDateTimeGreaterThanOrEqualFilter(starTime, expression); query = query.AddDateTimeLessThanOrEqualFilter(endTime, expression); return(query); }