首页 > 其他 > 详细

EntityFramework6 版本更变产生的错误

时间:2015-11-21 18:24:51      阅读:514      评论: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
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!