15
bu koduLINQ yöntemi 'System.DateTime AddSeconds (Çift)' yöntemini tanımıyor ve
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."}
bu hatayı almaya içine bu yöntem tercüme edilemez
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
});
Sorunun x.DateTimeStart.AddSeconds(x.ReminderTime)
içinde olduğuna inanıyorum. Benim durumumdaki .AddSeconds argümanı "dinamik" olmalıdır ... Herhangi bir fikir nasıl çözülür?
EntityFunctions artık geçersiz olduğunu unutmayın. Bunun yerine 'DbFunctions' kullanın. –
@TylerForsythe Güncelleme için teşekkürler! Bu bir hızla değişen dünya :) –
{ "İŞLEVİ db.AddMinutes yok"} :(Pažout @ –