MySql EF6向导崩溃。有谁知道修复? [英] MySql EF6 wizard crashes. Does anyone know a fix?
本文介绍了MySql EF6向导崩溃。有谁知道修复?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试基于现有数据库创建EF模型。我能够创建一个空白模型,但是当我尝试使用现有数据库时,在我选择数据库连接后,向导总是崩溃。
我看过在几个论坛上弹出问题,大多数都没有答案,那些没有答案,不起作用> _<< br mode =hold/>
有谁知道我怎么做解决这个问题?
谢谢
Andy
这些是相关的位:
App.config:
Hi,
I am trying to create an EF model based on an existing database. I am able to create a blank model, but when I try to use an existing db, the wizard always crashes after I choose the db connection.
I have seen the issue pop up on several forums, most have no answers and the ones that do, don't work >_<<br mode="hold" />
Does anyone know how I can solve this issue?
Thanks
Andy
These are the relevant bits:
App.config:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<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.SqlConnectionFactory, EntityFramework" />
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
<provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6, Version=6.9.7.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
</providers>
</entityFramework>
<system.data>
<DbProviderFactories>
<remove invariant="MySql.Data.MySqlClient" />
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.9.7.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
</DbProviderFactories>
</system.data>
</configuration>
和我的包裹:
and my packages:
<packages>
<package id="EntityFramework" version="6.1.3" targetFramework="net45" />
<package id="MySql.Data" version="6.9.7" targetFramework="net45" />
<package id="MySql.Data.Entity" version="6.9.7" targetFramework="net45" />
</packages>
推荐答案
这是一个bug,但有一个workarround。请参阅: http://stackoverflow.com/questions/ 21206184 / cant-use-a-mysql-connection-for-entity-framework-6 [ ^ ]
请参阅文档:< a href =http://dev.mysql.com/doc/connector-net/en/connector-net-entityframework60.html>第10章EF 6支持 [ ^ ]
It's a bug but there's a workarround. Please see this: http://stackoverflow.com/questions/21206184/cant-use-a-mysql-connection-for-entity-framework-6[^]
Please see the documentation too: Chapter 10 EF 6 Support[^]
这篇关于MySql EF6向导崩溃。有谁知道修复?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文