LINQ to Entities não reconhece o método 'System.DateTime AddSeconds (Double)', e este método não pode ser traduzido em
Eu recebo este erro
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."}
neste código
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
});
Eu acredito que o problema está emx.DateTimeStart.AddSeconds(x.ReminderTime)
O argumento de .AddSeconds no meu caso deve ser "dinâmico" ... Alguma idéia de como resolvê-lo?