gpt4 book ai didi

c# - LINQ WHERE 日期问题

转载 作者:行者123 更新时间:2023-11-30 17:03:47 24 4
gpt4 key购买 nike

<分区>

有人指出这个问题吗?不断收到“LINQ to Entities 不支持指定的类型成员‘Date’。仅支持初始值设定项、实体成员和实体导航属性。”

public IEnumerable<Appointment> FindAllAppointmentsWithReminders()
{
DateTime reminderDate = DateTime.Today.Date;
IEnumerable<Appointment> apps = RepositorySet
.OfType<Appointment>()
.Include("Client")
.Where(c => EntityFunctions.TruncateTime(c.Client.Reminder.Date) == reminderDate.Date
&& reminderDate.Date > EntityFunctions.TruncateTime(c.StartTime.Date));

return apps;
}

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com