出现这个错误提示能够用 DbFunctions.TruncateTime 将Linq中entity的DateTime转化一下再使用,以下所示:spa
var anyCalls = _db.CallLogs.Where(x => DbFunctions.TruncateTime(x.DateTime) == callDateTime.Date).ToList();
更多详细解答请看以下连接:code
http://stackoverflow.com/questions/14601676/the-specified-type-member-date-is-not-supported-in-linq-to-entities-only-init blog
Date vs DateTimeci
http://stackoverflow.com/questions/798121/date-vs-datetime it