EntityFramework.dll VS System.Data.Entity.dll - 歧义 [英] EntityFramework.dll vs System.Data.Entity.dll -- ambiguity

查看:241
本文介绍了EntityFramework.dll VS System.Data.Entity.dll - 歧义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不知道什么EntityFramework.dll和System.Data.Entity.dll的共同点和他们有什么不同?我的项目引用System.Data.Entity.dll(六月CTP)利用code第一个模型,一切工作正常。

I wonder what EntityFramework.dll and System.Data.Entity.dll have in common and what they have different? My project references System.Data.Entity.dll (June CTP) to leverage code first model and everything works fine.

现在我想用code首先迁移工具,它需要EntityFramework.dll,我也有添加到我的项目。然而,当这两个库(EntityFramework.dll和System.Data.Entity.dll)被引用,我得到了很多编译器错误争辩说,一些归类在这两个库中定义的。

Now I wish to use Code First Migrations tool, and it requires EntityFramework.dll that I also have to add to my project. However, when both libraries (EntityFramework.dll and System.Data.Entity.dll) are referenced, I get a lot of compiler errors arguing that some classed are defined in both libraries.

当我删除EntityFramework.dll,该项目不会再编译,但我不能使用迁移。当只有EntityFramework.dll被引用,我得到的编译错误,告诉我​​,一些类未找到(如空间数据类型)。

When I remove EntityFramework.dll, the project does compile again but I cannot use Migrations. When only EntityFramework.dll is referenced, I get complier errors telling me that some classes are not found (e.g. Spatial datatype).

我应该怎么做在这种情况呢?预先感谢您!

What should I do in this situation? Thank you in advance!

推荐答案

System.Data.Entity.dll版4.2.0.0(六月CTP 2011)包含了从EFv4.0和EFv4.1 =既ObjectContext的API和的DbContext API +新功能,但它可能是唯一的版本,很长一段时间,这将结合这两个API以相同的组件。这CTP已经死了。新的核心功能将被移动到.NET 4.5的DbContext API将被运往仍然含有EntityFramework.dll独立的NuGet包。一切都说明<一href="http://blogs.msdn.com/b/adonet/archive/2011/10/18/how-we-talk-about-ef-and-its-future-versions.aspx">here.

System.Data.Entity.dll version "4.2.0.0" (June CTP 2011) contains everything from EFv4.0 and EFv4.1 = both ObjectContext API and DbContext API + new features but it is probably the only version for a long time which will combine these two APIs in the same assembly. This CTP is dead. The new core features will be moved to .NET 4.5 and DbContext API will be still shipped as separate NuGet package containing EntityFramework.dll. Everything is described here.

code迁移取决于EFv4.1更新1和它EntityFramework.dll。他们不是与6月份的CTP兼容,它是在他们的安装说明直接描述或<一href="http://blogs.msdn.com/b/adonet/archive/2011/09/21/$c$c-first-migrations-alpha-3-released.aspx">$p$prequisites =你不能使用它们六月CTP。

Code migrations are dependent on EFv4.1 Update 1 and its EntityFramework.dll. They are not compatible with June CTP and it is directly described in their installation notes or prerequisites = you cannot use them with June CTP.

这篇关于EntityFramework.dll VS System.Data.Entity.dll - 歧义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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