IronPython无法导入数据实体(System.Data.Entity)

时间:2015-03-31 13:12:46

标签: .net entity-framework ironpython

以下是我使用的代码:

import clr
clr.AddReference("System.Data")
clr.AddReference("System.Data.Entity")
from System.Data.Entity import DbSet

我收到了这个错误:

  

追踪(最近的呼叫最后):
  文件"",第1行,在   ImportError:没有名为Entity的模块

我很困惑。如果确实没有名为Entity的模块,那么当我添加System.Data.Entity作为参考时,我应该会失败。

为什么会这样?在导入之前是否需要设置连接字符串?

由于

0 个答案:

没有答案
相关问题