Page 1 of 1

Linq syntax for emitting Between

Posted: Tue 04 Oct 2011 01:20
by KW
I am using Linq to entities.

I am wondering if there is any way to get linq to emitt the Between key word when dealing with dates, for example:

this.objectcontext.where(x=>x.Date between x and y);

I know you can emit x.Date >= '' and <= '' but this is not what I want. I have need to use mysql bewteen key word.

Posted: Fri 07 Oct 2011 05:54
by Shalex
There is no Between key word in LINQ to Entities. Could you please tell us its advantage comparing to x.Date >= '' and <= '' ?