<entityFramework> <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" /> <providers> <provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6" /> <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" /> </providers> </entityFramework>然后窗户关上了,什么也没发生。
发布于 2014-10-16 01:38:22
使用NuGet和扩展SDK添加引用
安装EF6 NuGet包
您需要升级到新的实体框架6运行时。
右键单击项目并选择“管理NuGet包”.
在“联机”选项卡下选择“EntityFramework”并单击“安装”。
注意:如果安装了EntityFramework NuGet包的前一个版本,这将将其升级到EF6。
核对表:
- This means that you must add the new EF6 assemblies to all of the relevant projects in the solution, in particular the entry project.
- This means that you must remove assembly System.Entity from all projects, as this refers to EF5.
- EntityFramework
- EntityFramework.SqlServer
- Remove C# lines "using System.Data.EntityClient;", which is an EF5 reference.
- Add C# line"using System.Data.Entity.Core.EntityClient;" which is the correct for EF6.
这个清单是一个社区Wiki,
https://stackoverflow.com/questions/26394823
复制相似问题