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