EF 查询异常
本帖最后由 wrost 于 2013-10-11 23:39:43 编辑 DateReceive 的类型是 DateTime?
估计出错在这里
问题:该怎么写?
DateTime dt = inbox_One.DateReceive.Value;
next_Mail.inbox = db.Inbox.Include("Mail.RegisteredUsers").Include("RegisteredUsers").
Where(a => a.LoginName == loginName && a.DateReceive.Value <= dt).OrderByDescending(a => a.DateReceive.Value).First();