[英]MySql and Entity Framework in VS2012 - cannot select provider
I am trying to write a data-access layer for an existing MySQL database using EntityFramework 5 in .Net 4.5 with Visual Studio 2012. I've run the following nuget commands in the Visual Studio 2012 nuget console to get started:我正在尝试使用 EntityFramework 5 在 .Net 4.5 和 Visual Studio 2012 中为现有 MySQL 数据库编写数据访问层。我在 Visual Studio 2012 nuget 控制台中运行了以下 nuget 命令以开始:
Install-Package EntityFramework
Install-Package MySQL.Data.Entities
However, when I attempt to add an Ado.Net Entity Data Model and "Generate from database", and then 'New Connection', the MySQL provider is not listed in the "Data Source" listbox, nor is it available in the 'Data Provider" combobox.但是,当我尝试添加 Ado.Net 实体数据模型和“从数据库生成”,然后添加“新连接”时,MySQL 提供程序未列在“数据源”列表框中,也未在“数据源”列表中可用提供者”组合框。
Am I missing something simple?我错过了一些简单的东西吗? I'm writing a class-library.. but I've tried these same steps in a Console Application with the same results.
我正在编写一个类库……但我在控制台应用程序中尝试了这些相同的步骤,结果相同。
I received this direction from Gabriela Martinez:我收到了 Gabriela Martinez 的指示:
The nuget packages for MySQL are from someone in the community and are not fully supported.
MySQL 的 nuget 包来自社区中的某个人,并不完全受支持。 To get the Visual Studio interface working properly with Entity Framework, it is recommended that developers install the MSI of the MySQL connector tools.
为了使 Visual Studio 界面与 Entity Framework 正常工作,建议开发人员安装 MySQL 连接器工具的 MSI。
After that install, I was able to begin running with MySQL in Entity Framework with no problems.安装后,我可以开始在 Entity Framework 中运行 MySQL,没有任何问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.