title: LINQ 2 Entities , howto check DateTime.HasValue within the linq query
body: <p>I have this method that is supposed to get the latest messages posted, from the Table (&amp; EntitySet) called ENTRY</p>
  
  <p>///method gets "days" as parameter, used in new TimeSpan(days,0,0,0);!!</p>
  
  <pre><code>using (Entities db = new Entities())
      {
          var entries = from ent in db.ENTRY
                        where ent.DATECREATE.Value &gt; DateTime.Today.Subtract(new TimeSpan(days, 0, 0, 0))
                        select new ForumEntryGridView()
                        {
                            id = ent.id,
                            baslik = ent.header,
                            tarih = ent.entrydate.Value,
                            membername = ent.Member.ToString()
                        };
          return entries.ToList&lt;ForumEntryGridView&gt;();
      }
  </code></pre>
  
  <p>Here the DATECREATED is Nullable in the database. I cant place "if"s in this query ... any way to check for that? Thx in advance</p>