开发者

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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜