IronPython 实体框架 6 找不到属性在哪里

IronPython entity framwork 6 Could not find attribute where

我已经成功地将 entity framework 集成到我的项目中。我还可以通过我的 dbcontext 从 table 读取数据。但是当我尝试使用 linq where 方法时,我收到以下错误消息: 'DbSet[Workflow]' object has no attribute '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:

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