I have this method that should receive the last sent messages from a table (& EntitySet) named ENTRY
/// method gets "days" as the parameter used in the new TimeSpan (days, 0,0,0); !!
using (Entities db = new Entities())
{
var entries = from ent in db.ENTRY
where ent.DATECREATE.Value > 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<ForumEntryGridView>();
}
Here DATECREATED is Nullable in the database. I canβt indicate if if in this query ... any way to check this? thanks in advance
source
share