title: Linq if DateTime field is older than X hours
body: <p>I have tried the following (obviously without the //), but I can't get any to work, can anybody help please?</p>
  
  <pre><code>    public void CleanBasket()
      {
          //double validHours = 3;
          // var expired = (from a in db.Baskets where (DateTime.Now - a.DateCreated).TotalHours &gt; validHours  select a);
          //var expired = (from a in db.Baskets where (DateTime.Now.Subtract(a.DateCreated).Hours &gt; 3) select a);
          //var expired = (from a in db.Baskets where(a =&gt; a.DateCreated &gt; DateTime.Now.AddHours(-1));
          //foreach (Basket basket in expired) db.DeleteObject(expired);
          db.SaveChanges();
      }
  </code></pre>