gpt4 book ai didi

c# - 在 Entity Framework 中查询今天的记录

转载 作者:行者123 更新时间:2023-11-30 13:44:58 25 4
gpt4 key购买 nike

<分区>

我如何在下面的 EF 中只获取今天的记录。我在下面尝试但没有运气:

 List<VacancyBasket> VacancyBasket = bModel.VacancyBaskets
.Where(b => b.BasketID == teacherGuid && b.Created == DateTime.Now)
.ToList();

我遇到异常:

The specified type member 'Date' is not supported in LINQ to Entities. Only initializers, entity members, and entity navigation properties are supported.

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