标签:
最近有个新项目想用EF来写。从网上看了一些资料,学习了基本的CRUD方法,准备拿到手里试一试。
开发环境是Visual studio 2010 SP1 发现好多方法对不上。更新到6.1.3还是不行。折腾了两天发现应该是开发环境.NET 4.0 的问题。
stackoverflow上有人解释
Entity framework 4.0 (System.Data.Entity.dll) is part of .NET 4.0. There is no separate download. EF 4.1 ad EF 4.2 are distribution of EntityFramework.dll (not System.Data.Entity.dll). EF 4.2 is only distributed as NuGet and is not installed to GAC.
Reverse Engineer Code First is not part of any of these tools. It is part of EF Power Tools CTP 1 which is most probably dependent on EF 4.1 (it was released prior to EF 4.2 and there is possibility that it doesn‘t work with EF 4.2). This tool itself has no relation to functionality of Entity framework.
使用EF还添加System.Data.Entity.dll这个,这个是来自.NET 4.0 的。网上的资料应该都是4.5的环境。公司内网服务器上的环境还是4.0没有更新。EF很多高级的新特性还是很动人的,这次还是用LINQ吧。
标签:
原文地址:http://www.cnblogs.com/ioage/p/4563743.html