博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
VS2017+MySQL+EF6
阅读量:5039 次
发布时间:2019-06-12

本文共 1417 字,大约阅读时间需要 4 分钟。

  1. Uninstall/remove "Connector/NET" and "MySQL for Visual Studio" if installed.

  2. Install "MySQL for Visual Studio" v2.0.5 CTP (). Note: Install MySQL for Visual Studio before Connector/NET.

  3. Install "Connector/NET" v6.9.10 ().  Note: I tried using Connector/NET v6.8, v6.10 and v8 first, but none of them worked with Visual Studio 2017 and ADO.Net. , but so far this list is inaccurate.

  4. Create new Visual Studio Professional 2017 project.

  5. Download and Install "EntityFramework" v6.2.0 through NuGet, by going to Project Tab/Manage NuGet Packages/Browse -> Entity Framework.

  6. Add references to C:\Program Files (x86)\MySQL\Connector.NET 6.9.10\Assemblies\v4.5\MySql.Data.dll and C:\Program Files (x86)\MySQL\Connector.NET 6.9.10\Assemblies\v4.5\MySql.Data.Entity.EF6.dll; by Right Clicking over References inside Solution Explorer and selecting Add Reference/Browse ->Browse button.

  7. Add MySQL EF6 provider info inside App.config under entity framework providers as follow:

 

 

  1. Rebuild project by going to Build tab/Rebuild ProjectName.

And that's it. VS2017 is ready to go. Hope this works for everybody, as it did for me today.

use <
<数据库名称>
>;set global optimizer_switch='derived_merge=OFF';

 

 

引自 https://stackoverflow.com/questions/28241500/cant-create-entity-data-model-using-mysql-and-ef6/38619052#38619052

 

转载于:https://www.cnblogs.com/wangshuming/p/8254175.html

你可能感兴趣的文章
全面整理的C++面试题
查看>>
Web前端从入门到精通-9 css简介——盒模型1
查看>>
Activity和Fragment生命周期对比
查看>>
OAuth和OpenID的区别
查看>>
android 分辨率自适应
查看>>
查找 EXC_BAD_ACCESS 问题根源的方法
查看>>
国外媒体推荐的5款当地Passbook通行证制作工具
查看>>
日常报错
查看>>
list-style-type -- 定义列表样式
查看>>
hibernate生成表时,有的表可以生成,有的却不可以 2014-03-21 21:28 244人阅读 ...
查看>>
mysql-1045(28000)错误
查看>>
Ubuntu 编译出现 ISO C++ 2011 不支持的解决办法
查看>>
1.jstl c 标签实现判断功能
查看>>
Linux 常用命令——cat, tac, nl, more, less, head, tail, od
查看>>
超详细的Guava RateLimiter限流原理解析
查看>>
VueJS ElementUI el-table 的 formatter 和 scope template 不能同时存在
查看>>
Halcon一日一练:图像拼接技术
查看>>
Swift - RotateView
查看>>
iOS设计模式 - 中介者
查看>>
centos jdk 下载
查看>>