Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/amazon-s3/2.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
.net IronPython实体framwork 6找不到属性where_.net_Linq_Entity Framework_Entity Framework 6_Ironpython - Fatal编程技术网

.net IronPython实体framwork 6找不到属性where

.net IronPython实体framwork 6找不到属性where,.net,linq,entity-framework,entity-framework-6,ironpython,.net,Linq,Entity Framework,Entity Framework 6,Ironpython,我已经成功地将实体框架集成到我的项目中。我还能够通过dbcontext从表中读取数据。但是当我尝试使用linqwhere方法时,我得到以下错误消息:'DbSet[Workflow]'对象没有属性'where' 这是我的代码: import clr import sys from Framework.EF import MyDbContext, Workflow from System import Console from System.Linq import Enumerable, IQuer

我已经成功地将实体框架集成到我的项目中。我还能够通过dbcontext从表中读取数据。但是当我尝试使用linq
where
方法时,我得到以下错误消息:'DbSet[Workflow]'对象没有属性'where'

这是我的代码:

import clr
import sys
from Framework.EF import MyDbContext, Workflow
from System import Console
from System.Linq import Enumerable, IQueryable
from System import Linq

context = MyDbContext()

Console.WriteLine(     context.Workflow.Where(lambda x: x.DisplayName == 'ABC123').ToList()[0].DisplayName          )    
也许有人对linq和ironpython有经验


谢谢大家!

发现问题;我必须使用导入:

import clr
import System
clr.ImportExtensions(System.Linq)