码迷,mamicode.com
首页 > 其他好文 > 详细

EntityFramework6 版本更变产生的错误

时间:2015-11-21 18:26:18      阅读:166      评论:0      收藏:0      [点我收藏+]

标签:

LINQ to Entities does not recognize the method ‘System.Nullable`1[System.Int32] DiffMinutes(System.Nullable`1[System.DateTime], System.Nullable`1[System.DateTime])‘ method, and this method cannot be translated into a store expression.


解决:EntityFunctions.DiffMinutes method在EntityFramework6中已改成DbFunctions.DiffMinutes,所以不要引入using System.Data.Objects,换成引入using System.Data.Entity替换之

 

EntityFramework6 版本更变产生的错误

标签:

原文地址:http://www.cnblogs.com/chenjianxiang/p/4984174.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!