Setting up .NET MVC3 with MySQL
Hy Guys,
How can I configure the webconfig to access a mysql db using MVC 3?
To use SQLExpress I included this code to configure in an example...
<add name="MovieDBContext"
connectionString="Server=.开发者_JAVA技巧\SQLEXPRESS;
Database=Movies;Trusted_Connection=true"
providerName="System.Data.SqlClient" />
I'm using Entity Framework.
PS.: I don't want to automatically create tables with the MVC. I want to create them manually.
Thks!
Take a look at this post, it seems like your best option is to use MySql Connector with EF
Using MySQL with Entity Framework
your connection string should look something like:
Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
精彩评论