在VS的EF中连接MySQL
VS没有主动提供那些繁多的连接器,需要的话得自己再安装这些第三方程序包。
MySQL为windows平台开发者提供了许多程序包:http://dev.mysql.com/downloads/windows/
其中就包含为VS提供的连接器:mysql-connector-net-6.9.8.msi 以及 mysql-for-visualstudio-1.2.5.msi(数字仅为版本号)
=====================
步骤:
1、下载和安装mysql-connector-net-6.9.8.msi 以及 mysql-for-visualstudio-1.2.5.msi
下载地址 mysql-connector-net:http://dev.mysql.com/downloads/connector/net/
mysql-for-visualstudio:http://dev.mysql.com/downloads/windows/visualstudio/
注:各个版本支持的连接器参考:https://dev.mysql.com/doc/connector-net/en/connector-net-versions.html
2、上面两个文件安装好后,打开VS,打开解决方案。
然后在菜单中选择:工具—>程序包管理器—>管理解决方案的 NuGet程序包,左侧选联机 右上角搜索 MySql.Data.Entity,然后直接安装。
安装完毕后退出,再次打开VS,打开解决方案,新建edmx文件向导,更改数据源就能看到MySql选项:
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAb4AAADpCAIAAADUE8VFAAAc0UlEQVR4nO2dV9QcxZXH59kY44BZ47UB24gcTTLRQ7BJNtlEAyJj5QRC+ZOEkEBCEYEkhJCEJHLOOYMIawsoHNbGmAUMNjbsWT/s7tmH3ocW7VbdW7dup5rumf89v6PTU1N1q6qn+zfVPfONWlEUmXVrAQAAeOnr62u321EUtRJ1fmHrATEb9RuwUb+BG20z8IvbDPziNoM23nbQxtsO2ni7wV/abvCXthu8yfZDNtl+yCY7DPnyDkO/vOPQL+849Cs7DvvKTsO+utOwr+48/Ks7D//azsO/tsuITXcZsemuIzbddeTXdx359d1GbrbbqM12H7XZ7qP+5fuXxHxjj0u/scelm+956eZ7jt58z9Hf3Gv0N/e67F/3jhnzrX3GfGufMd/+wdhv/2Dst/cdu8W+47bYd9wW+43bcr/xW+4/fqv9x2+1/4StDpjwnQMmfOfAid89cOJ3D5r43YMmfe+gSd/74aTv/bBv63bf1u2+fu3J/Q6e3O/gydscMmWbQ6Zse8iUb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n11C6OpMDhj22heO5XI/UatUpn+AlDqbW6rR2jVdY8m4SdjdtIm/r1al5jeUZQZ1dQ4nqpNL0arG6g6Q+q05X5dLfLUz91WkcvqDuSB9Dch5hXyu3vTpjX1FrbK6D3ut0eLOhlKhOw60q5DOlO9TJbijfKnpLncJba1KB3UfCjnNJNpM607LWv5zCCynX17wfgJpTqTpd777WmeJ6ey5CR9QpvCW49klT1emtk+9ep2ZHu5KkXwPXGxfVtMvU7CBdLx7No1FtdccBCEAr7L1Oa7u6A6Yj3+ukE/TOt5HqFNab1toTgG6ldHWy/9INYXFQCuH/msi1qJJXV41UJwCgXHWm01oPM10AFadT6swkytIv1KBOAAJRkTo7Ts3/hr3SWeeo350HAQDVAXV2E0p1JnsA6gQgJ7E6Nb9d27iAOlmiKOrfv79VH+oEIButVqvdveFSZ6etXmG0RXXG3oQ6ASgK+1lNNwWdcmdtHiBcr7XlTQN1AgCATNqbuNcJAAB+LG/igh0AADxQb0KdAAAgIXjTpH7HA+oEAID1uLyJe50AAMAjeBMX7AAAwCB7E+oEAAAbpTcN1AkAADF6bxqoEwAATEZvGqgTAAByAHUCAEBmoE4AAMjMP9UZ/ieeEAgEorkRq/P/AbNOjlu9H9kWAAAAAElFTkSuQmCC" alt="" />
PS.
以上安装完成后,在引用中会自动添加MySql.Data.dll和MySql.Data.Entity.EF6.dll的引用;另外web.config中也会添加provider节:
<provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6, Version=6.9.8.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"></provider>
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.8.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
</DbProviderFactories>
在VS的EF中连接MySQL的更多相关文章
- 使用EF CodeFirst连接MySql数据库
如何使用EF CodeFirst连接MySql数据库? 我们这篇文章介绍怎么使用EF连接MySql 作者的环境 VS2017.Win10.MySql5.x 前言 一般在EF中,默认是使用SqlServ ...
- 第八节:EF Core连接MySql数据库
一. 前提 1.安装EF Core连接MySQL的驱动,这里有两类: (1).Oracle官方出品:MySql.Data.EntityFrameworkCore (版本:8.0.17) (2).其他第 ...
- Odoo中连接mysql数据库
how to integrate Odoo with MySQL - Stack Overflowhttps://stackoverflow.com/questions/31959919/how-to ...
- Java中连接MySql数据库的例子
Java中连接MySql数据库的例子: package com.joinmysql.demo; import java.sql.DriverManager; import java.sql.Resul ...
- Django 3.0 中连接mysql 8.0,可以不使用pymysql ,升级Mysqlclient即可
python 中,连接mysql一般都推荐用pymysql ,而且在django中,网上的教程都是这么连接mysql的. import pymysql pymysql.install_as_MySQL ...
- django 中连接mysql数据库的操作步骤
django中连接mysql数据库的操作步骤: 1 settings配置文件中 DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mys ...
- .net 中连接mysql
1. 下载mysql驱动.里面包含需要连接mysql的dll.mysql-connector-net 地址:http://dev.mysql.com/downloads/file/?id=463 ...
- Eclipse中利用JSP把mysql-connector-java-8.0.13.jar放到WebContent\WEB-INF\lib中连接MySQL数据库时Connection conn = DriverManager.getConnection(url,username,password)报错的解决办法
开发环境: 1.系统:windows 7/8/10均可 2.jdk:1.8.0_144 3.服务器:apache-tomcat-9.0.8 4.IDE:eclipse+jsp 0.网页代码如下: &l ...
- 在EF中使用MySQL的方法及常见问题
有时需要在网上租用空间或数据库,Mysql成本低一些,所以想将sql server转成mysql…… 注意:在安装Mysql时要选择文字集为utf8,否则将不能使用中文(当前也可以在创建数据库时使用u ...
随机推荐
- kaggle数据挖掘竞赛初步--Titanic<原始数据分析&缺失值处理>
Titanic是kaggle上的一道just for fun的题,没有奖金,但是数据整洁,拿来练手最好不过啦. 这道题给的数据是泰坦尼克号上的乘客的信息,预测乘客是否幸存.这是个二元分类的机器学习问题 ...
- sed 使用
Sed简介 sed 是一种在线编辑器,它一次处理一行内容.处理时,把当前处理的行存储在临时缓冲区中,称为"模式空间"(pattern space),接着用sed命令处理缓冲区中的内 ...
- jquery ajax跨域调用
客户端: //ajax跨域调用的方法 $.ajax({ url:dustUrl+"/screenshot/getDevices.do", type: "get" ...
- bzoj2006: [NOI2010]超级钢琴
题意:给一个序列(n<=500000),要求选定k个不同区间,使得区间长度在L,R之间,并使得k个区间和之和最大,输出这个最大值. 刚拿到题的时候想的是,对于每个点,如果以它开头,那么之后的L- ...
- 基础篇-初步认识PE格式
1 PE(Portable Executable)格式,是Win32环境可移植可执行文件(如exe.dll.vxd.sys和vdm等)的标准文件格式.PE格式衍生于早期建立在VAX(R)VMS(R)上 ...
- IOS Core Animation Advanced Techniques的学习笔记(五)
第六章:Specialized Layers 类别 用途 CAEmitterLayer 用于实现基于Core Animation粒子发射系统.发射器层对象控制粒子的生成和起源 CAGradient ...
- 发布自己的pods到CocoaPods trunk 及问题记录
这两天准备把之前写的一些小玩意添加到pods库中去,参考了一些资料后进行操作,实际中也遇到了一些问题,记录下来,问题及解决方式在后面. 参考内容转载如下: 首先更新了用trunk之后,CocoaPod ...
- 《JavaScript高级程序设计》读书笔记--(1)JavaScript简介
概述 JavaScript是一种直译式脚本语言,是一种动态类型.弱类型.基于原型的语言,内置支持类型.它的解释器被称为JavaScript引擎,为浏览器的一部分,广泛用于客户端的脚本语言,最早是在HT ...
- OC基础--self关键字
Self的使用: 1 self不能离开类 离开类之后没有任何意义 2 self会自动区分类方法和对象方法 3 使用self的时候只需要关注self在哪一个方法中 如果在类方法中使用self 那 ...
- 取得交换机的MAC地址
一.首先PING交换机的IP地址 二.然后执行 ARP -a 命令 如下图: