title: How to get all records within the last Two Days from the current Date using EF 4?
body: <p>EF 4 in C#.</p>
  
  <p>I have my query, at the moment I'm able to filter the result by the current Date (just date not considering TIME).</p>
  
  <p>I need to filter the result <strong>FROM the last two days TO the current Date</strong> (no idea how to do it).</p>
  
  <p>I tried in my query <code>currenteDate - 2</code> but without success.</p>
  
  <p>Could you please give me an example? Thanks for your time on this.</p>
  
  <pre><code>DateTime currenteDate = DateTime.UtcNow.Date;
  
                  var contents = from cnt in context.CmsContents
                                 where cnt.IsPublished == true &amp; cnt.IsDeleted == false &amp; cnt.Date == currenteDate
                                 orderby cnt.ContentId descending
                                 select new { cnt.ContentId, cnt.Title, cnt.TitleUrl, cnt.Date, cnt.TypeContent };
  </code></pre>