LINQ to Entities nie rozpoznaje metody „System.DateTime AddSeconds (Double)”, a tej metody nie można przetłumaczyć na

Otrzymuję ten błąd

base {System.SystemException} = {"LINQ to Entities does not recognize the method 'System.DateTime AddSeconds(Double)' method, and this method cannot be translated into a store expression."}

na ten kod

      var eventToPushCustom = eventCustomRepository.FindAllEventsCustomByUniqueStudentReference(userDevice.UniqueStudentReference)
                                    .Where(x => x.DateTimeStart > currentDateTime && currentDateTime >= x.DateTimeStart.AddSeconds(x.ReminderTime))
                                    .Select(y => new EventPushNotification
                                    {
                                        Id = y.EventId,
                                        EventTitle = y.EventTitle,
                                        DateTimeStart = y.DateTimeStart,
                                        DateTimeEnd = y.DateTimeEnd,
                                        Location = y.Location,
                                        Description = y.Description,
                                        DeviceToken = y.UsersDevice.DeviceTokenNotification
                                    });

Wierzę, że problem jestx.DateTimeStart.AddSeconds(x.ReminderTime)

Argument .AddSeconds w moim przypadku musi być „dynamiczny” ... Każdy pomysł, jak go rozwiązać?

questionAnswers(1)

yourAnswerToTheQuestion