Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/linq/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Linq 包括仍在实体框架核心上工作。NET 5.0?_Linq_Entity Framework Core_.net 5 - Fatal编程技术网

Linq 包括仍在实体框架核心上工作。NET 5.0?

Linq 包括仍在实体框架核心上工作。NET 5.0?,linq,entity-framework-core,.net-5,Linq,Entity Framework Core,.net 5,当我尝试编写此代码时,无法识别。Include dbContext.Field.Include(i => ..); 例如: 您似乎错过了using语句,因此找到了Include扩展名 因此,使用Microsoft.EntityFrameworkCore添加。是否已使用Microsoft.EntityFrameworkCore添加;或者Microsoft.EntityFrameworkCore.Query?@magicandre1981否。您是对的,必须添加到使用.Include的方法中。

当我尝试编写此代码时,无法识别
。Include

dbContext.Field.Include(i => ..);
例如:


您似乎错过了using语句,因此找到了Include扩展名


因此,使用Microsoft.EntityFrameworkCore添加

是否已使用Microsoft.EntityFrameworkCore添加;或者Microsoft.EntityFrameworkCore.Query?@magicandre1981否。您是对的,必须添加到使用.Include的方法中。谢谢。好的,我把它作为答案加上去了。在EF6中,人们常常忘记添加。