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替换

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-12
  • 2021-06-29
  • 2022-01-06
  • 2021-10-04
  • 2021-08-14
  • 2022-12-23
猜你喜欢
  • 2021-11-30
  • 2022-12-23
  • 2021-09-15
  • 2021-10-02
  • 2021-07-14
  • 2021-12-02
  • 2021-11-29
相关资源
相似解决方案