我找不到“包含”实体框架中使用lambda表达式的方法? [英] I can't find "Include" method with lambda expression in Entity framework?

查看:148
本文介绍了我找不到“包含”实体框架中使用lambda表达式的方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用实体框架,但找不到此示例中的include方法:

I am using entity framework and I can't find include method like in this example:

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

在这里,我只找到包含参数(字符串路径)的函数,而没有找到其他重载,因此如何在lambda表达式中使用包含?

here i find only the function include with the parameter (string path) and I don't find any other overload so how can I use Include with lambda expression?

推荐答案

它不在System.Linq中。
添加

it's not in System.Linq. Add

using System.Data.Entity

这篇关于我找不到“包含”实体框架中使用lambda表达式的方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆