gpt4 book ai didi

c# - 我在 Entity 框架中找不到带有 lambda 表达式的 "Include"方法?

转载 作者:IT王子 更新时间:2023-10-29 04:07:06 25 4
gpt4 key购买 nike

我正在使用 Entity Framework ,但找不到像本例中那样的 include 方法:

using(ArticleExtractorEntities db=new ArticleExtractorEntities())  
{
Preference pref= db.Preferences.Include(

在这里我只找到包含参数(字符串路径)的函数,我没有找到任何其他重载,所以我如何将 Include 与 lambda 表达式一起使用?

最佳答案

它不在 System.Linq 中。添加

using System.Data.Entity

关于c# - 我在 Entity 框架中找不到带有 lambda 表达式的 "Include"方法?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11259483/

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