如何使用我的SQL在Visual Studio Web for 2012中使用实体框架 [英] How to work with entity framework with my SQL in visual studio web for 2012

查看:77
本文介绍了如何使用我的SQL在Visual Studio Web for 2012中使用实体框架的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用一个项目,其中MYSQL作为后端我希望将mysql与实体连接我厌倦了所有Visual Studio连接器并尝试使用mysql for visual studio也

但mysql数据源没有在数据源列表中显示任何人都可以帮我解决问题



我尝试过:



I am working with a project which has MYSQL as back end i want to connect mysql with entity i tired all connector for visual studio and try with mysql for visual studio also
but mysql data source not showing in data sources list can any one help me to resolve problem

What I have tried:

<system.data>
    <dbproviderfactories>
      <add name="MY SQL Data Provider" invariant="MySql.Data.MySqlClient" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="MySql.Data.MySqlClient.MySqlClientFactory ,MySql.Data, Version=6.6.5.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
      <!--<add name="Microsoft SQL Server Compact Data Provider 4.0" invariant="System.Data.SqlServerCe.4.0" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/>-->

推荐答案

首先,您的连接字符串可能是错误的。我无法分辨,因为你没有显示它。



其次,你需要确保安装了MySQL Connector / Net 6.8.x,找到的说明< a href =https://dev.mysql.com/doc/connector-net/en/connector-net-installation-windows.html>这里 [ ^ ]。



接下来,按照此页 [ ^ ]。看起来您在其上面发布的部分错误并且在app.config文件的错误部分中显示。
First, your connection string is probably wrong. I can't tell because you didn't show it.

Second, you need to make sure you installed the MySQL Connector/Net 6.8.x, instructions found here[^].

Next, follow the instructions on this page[^]. It would seem that the section you did post above it wrong and in the wrong section of your app.config file.


这篇关于如何使用我的SQL在Visual Studio Web for 2012中使用实体框架的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆