简体   繁体   English

使用MYSQL在ASP.NET MVC上创建数据库模型

[英]Creating Database Model on ASP.NET MVC with MYSQL

I'm using ASP.NET C# with database MYSQL, I follow this step on creating a database model with Entity Data Model Wizard http://www.asp.net/mvc/tutorials/movie-database/create-a-movie-database-application-in-15-minutes-with-asp-net-mvc-cs . 我正在使用带有数据库MYSQL的ASP.NET C#,我按照实现数据模型向导创建数据库模型的步骤http://www.asp.net/mvc/tutorials/movie-database/create-a-movie-数据库应用程序在15分钟内使用asp-net-mvc-cs When I run this, it showed error --> Unable to generate the model because of the following exception: 'The provider did not return a ProviderManifestToken string. 当我运行它时,它显示错误 - >由于以下异常而无法生成模型:'提供程序未返回ProviderManifestToken字符串。 Access denied for user 'root'@'localhost' (using password: NO). 用户'root'@'localhost'拒绝访问(使用密码:NO)。

I already have connection with the same connection string uses on webconfig MySQLMembershp I copied from this How do I setup ASP.NET MVC 2 with MySQL? 我已经连接了与webconfig相同的连接字符串连接MySQLMembershp我从这里复制了如何使用MySQL设置ASP.NET MVC 2? which is working. 这是有效的。

if they have the same connection string uses this should work, but why is not working when I create a database model. 如果他们有相同的连接字符串使用这应该工作,但为什么在我创建数据库模型时不工作。

First of all EF model connectionstring and Asp.NET membership connectionstring is different. 首先,EF模型连接字符串和Asp.NET成员资格连接字符串是不同的。 Secondly you may have to see how EF model works using MySQL database here 其次,您可能必须在此处查看EF模型如何使用MySQL数据库

Getting MySQL work with Entity Framework 4.0 让MySQL与Entity Framework 4.0一起使用

It seems like you have no password. 好像你没有密码。 Have your tried using the password "root"? 您尝试过使用密码 “root”吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM