问题
I would like to update my project from:
- ASP.NET MVC 2 with Entity Framework 4.
to
- ASP.NET MVC 4 and Entity Framework 4.1
How can this be done?
回答1:
You may take a look at the ASP.NET MVC 4.0 release notes which explain how to upgrade from an ASP.NET MVC 3 application. And the release notes of ASP.NET MVC 3.0 explain how to upgrade from ASP.NET MVC 2.
As far as upgrading from EF 4.0 to EF 4.1, it's as simple as updating the assembly reference. Of course if you wanted to do Code First approach you will have to make more extensive modifications.
回答2:
Instead of doing it manually which will indeed take a lot of effort....why not check out my answer to a similar question and use ASP.NET MVC 3 Application Upgrader to go from MVC2 -> MVC3 and UpgradeMvc3ToMvc4 to go from MVC3 -> MVC4.
来源:https://stackoverflow.com/questions/9282395/asp-net-mvc-2-to-mvc-4