LINQ to Entities 不识别方法“System.Nullable`1[System.Int32] DiffDays(System.Nullable`1[System.DateTime], System.Nullable`1[System.DateTime])”,因此该方法无法转换为存储表达式。

解决方案:

db.table.Where(m=>System.Data.Objects.EntityFunctions.DiffDays(m.CreateTime, DateTime.Now) == 0)
posted @ 2016-06-21 17:27  chenjingchun  阅读(3093)  评论(0编辑  收藏  举报