我如何使用Mysql + Ef6 [英] How Do I Use Mysql + Ef6
问题描述
大家好。我从EF6开始,我无法使用CodeFirst From Data Base添加新的ADO.NET实体数据模型。这些是我遵循的步骤
1.创建新的WebApplication。没有身份验证的MVC
2.运行Install-Package MySql.Data(版本6.9.6)
3.运行Install-Package MySql.Data.Entity(版本6.9。 6)(安装EF6因为是依赖项)
4.运行Install-Package MySql.Web(版本6.9.6)
5.运行Install-Package MySql.Fabric (版本6.9.6)
7.运行Install-Package MySQL.Net(版本6.6.4)
8.编辑在Web.Config上创建的connectionString。
Hello everyone. I'm starting with EF6 and i can't add a new ADO.NET Entity Data Model using CodeFirst From Data Base. These are the steps that i followed
1. Create new WebApplication. MVC with no autentication
2. Run Install-Package MySql.Data (Version 6.9.6)
3. Run Install-Package MySql.Data.Entity (Version 6.9.6) (install EF6 because is a dependency)
4. Run Install-Package MySql.Web (Version 6.9.6)
5. Run Install-Package MySql.Fabric (Version 6.9.6)
7. Run Install-Package MySQL.Net (Version 6.6.4)
8. Edit connectionString created on Web.Config.
<connectionStrings>
<remove name="LocalMySqlServer" />
<add name="LocalMySqlServer" connectionString="server=localhost;port=3307;uid=root;password=****" providerName="MySql.Data.MySqlClient" />
</connectionStrings>
9。重建解决方案
10.启动EntityDataModel向导
a。数据库中的代码优先
b。我的连接没有出现。我创建了一个新的mysql连接
c。崩溃
当我点击下一个向导时,向导崩溃。
你知道我做错了什么吗?
*希望你能原谅我的英语水平
9. Rebuild Solution
10. Start EntityDataModel wizard
a. Code First from Database
b. My Connection didn't appear. I create a new mysql connection
c. Crash
The wizard crash when I click next.
Do you know what I'm doing wrong?
*Hopefully you will excuse my level of English
推荐答案
参考
http:/ /lvasquez.github.io/2014/11/18/EntityFramework-MySql/ [ ^ ]
将MySQL与实体框架结合使用 [ ^ ]
尝试
http://www.ryadel.com/2014/10/20/asp-net-setup-mvc5-website-mysql-entity-framework-6-code- first-vs2013 / [ ^ ]
这篇关于我如何使用Mysql + Ef6的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!