從EF5升級到EF6之后,可能會出現一些問題,這是正常的,任何系統的升級都沒有一帆風順的,當然這些不是我要說的重點,我真正要說的是,當出現這些問題時,我們應該如何去應對它,下面我總結了幾個方面,請大家看一下
程序集
不需要應用托管的System.Data.Entity了,可以和它說再見,以后EF移植更方便!

配置文件
需要表明EF版本,如果你是vs2010或者vs2012的用戶,你應該注意這一點
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
<parameters>
<parameter value="v11.0" />
</parameters>
</defaultConnectionFactory>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
以上兩點大家注意之后,升級到EF6應該就沒什么問題了,呵呵。
