LINQ - more than or equal to
Part of the code:
...where se.DateFrom >= pDateFrom && se.DateTo <= pDateTo select se...
Does not work. T开发者_运维技巧here is no any error but the To and From days do not get returned.
How do I query "more than or equal to" and "less than or equal to"?
Thanks :)
Do your "dates" potentially contain a time element? If so, try something like this:
where se.DateFrom >= pDateFrom.Date && se.DateTo.Date <= pDateTo
精彩评论