我正在尝试使用EntityFramework执行Linq查询,但出现错误
System.NotSupportedException: LINQ to Entities does not recognizethe method 'System.Nullable`1[System.Int32] DiffMonths(System.Nullable`1[System.DateTime], System.Nullable`1[System.DateTime])' method, and thi
我希望执行一个linq查询,该查询将获取应用于以下逻辑的所有行:我的LINQ
from n in _context.Notificationswhere n.Start <= DateTime.Now.TimeOfDay && DateTime.Now.TimeOfDay <= n.Start.Add(new TimeSpan(0, n.Duration[Start] <=