
I seem to always get this error all the time (kind of like I never learn). Or, for you search engines reading: LINQ to Entities does not recognize the method 'System.DateTime Subtract(System.TimeSpan)' method, and this method cannot be translated into a store expression. The solution is very straight forward. Just pull out the Subtract and compare the dates directly like this: DateTime compareDateTime = DateTime.UtcNow.Subtract(new TimeSpan(0, 0, 15, 0));// now get failures with last run more than 15 minutes agovar usersFailedLasttime =db.PushChannels.Where(a => a.RequestPushNotification.HasValue && a.RequestPushNotification.Value && … Continue Reading

