Hi,
I am new to ASP.NET MVC but have gone through several tutorials already including those one asp.net/mvc and an 8 hour course on Intro to asp.net on MVA. I am working on a project and would like to use MysqL as the datasource. I have several questions in
this regard though.
- Does Scaffolding( creation of views for CRUD) apply when using MySql?
- I have tried creating an ASP.NET Mvc3 MySql Projectand was required to select atleast one table from the database. With the way database table fields change will Code First Entity Framework be applicable in my case.
- Is there a way to work with MySql on ASP.NET MVC4 or 5 without having to create MVC3 and adding files from MVC3 project as specified in this link
http://stackoverflow.com/questions/12181428/asp-net-mvc-4-ef5-with-mysql i.e this part
Get the AccountController and Views working:
- Delete the MVC 4 AccountController, AccountModels, Account view folder and _LoginPartial shared view
- Create a new MVC 3 web application
- Copy the MVC 3 AccountController, AccountModels, Account view folder and _LogOnPartial shared view into your MVC 4 application
- Replace
@Html.Partial(“_LoginPartial”)
in the shared _Layout view with
@Html.Partial(“_LogOnPartial”)
Thanks in advance.
Dennis
Hi Dennis,
In my opinion, the entity framework supported MySql, so I think scaffolding can supported MySql too. The MySql database is the third-party software, you’d better to do test by yourself.
About MVC 4 with MySql, please refer to:
# Using SimpleMembershipProvider with MySql Connector/Net.
https://blogs.oracle.com/MySqlOnWindows/entry/how_to_using_simplemembserhipprovider_with
There are some links that may benefit you:
# Getting MySQL work with Entity Framework 4.0
http://weblogs.asp.net/gunnarpeipman/getting-mysql-work-with-entity-framework-4-0
# Using Simple Membership Provider with mysql
http://stackoverflow.com/questions/12620922/using-simple-membership-provider-with-mysql
# Unable to create a controller when using asp.net MVC 4/Entity Framework.
Best Regards
Starain