I've just come across a bug where the order in date comparisons is critical:
DateTime? dateValue ...
q = q.Where(d => dateValue.Value >= d.MyDate);
This gets reordered in the generated SQL which is fine but the >= becomes <
[LPA_L2].[MyDate] < @MyDate20
If you reorder the lambda expression, everything is fine:
q = q.Where(d => d.MyDate <= dateValue.Value);
I haven't tried to see if this symptom appears with other data types.