title: Linq query with start date and end date
body: <p>I have start date and end date input from user.
  When user key in start date and end date and click search button, the query will then check against database which return list of item that is available in that specified date range. How can it be done in linq?</p>
  
  <p>Below show the table and further explaination.</p>
  
  <p><a href="http://s27.postimg.org/9rqm15pip/Untitled.png" rel="nofollow">Image</a></p>
  
  <p>Updated code, i joined two tables but it seems that i am unable to compare start date and enddate as linq to entities does not support datetime.</p>
  
  <pre><code>searchItem = db.Items.Join(db.ItemReserveds, x =&gt; x.ItemID, y =&gt; y.ItemID, (x,y) =&gt; new {x = x, y = y}).Where(
          z =&gt; (z.x.ItemID == z.y.ItemID).Select(z =&gt; new Item {
              ....
          }).Distinct();
      searchItem = searchItem.Where(z.StartDate &gt;= model.StartDate &amp;&amp; z.EndDate &lt;= model.EndDate); 
  </code></pre>