I used this article with VS 2013 [Go] and got it to work but not with VS 2017.
Will this continue to be supported? Anyone had any luck getting this to work VS 2017?
According to this
article, ASP.NET MVC 4 scaffolding does not support Entity Framework 6 or higher. Support of scaffolding of Entity Framework 6 is targeted for the next release of ASP.NET MVC.
Best Regards,
Brando
.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
There is one issue the OnSavingChanges is never called by the EntityDataSource replacement that the NuGet package introduces so you wont be able to process anything in there from DD.
See my blog C# Bits | Twitter @sjnaughton Always seeking an elegant solution.
Member
19 Points
181 Posts
Support for ASP.NET Dynamic Data Entities Website project template
Jan 13, 2018 09:54 PM|rodchar|LINK
I've used this template in VS 2013 with joyful ease, however, I've revisited this template in VS 2017 and doesn't work anymore.
Error:
Unable to cast object of type 'System.Data.Entity.Core.Objects.ObjectContext' to type 'System.Data.Objects.ObjectContext'.
I used this article with VS 2013 [Go] and got it to work but not with VS 2017.
Will this continue to be supported? Anyone had any luck getting this to work VS 2017?
Star
9831 Points
3120 Posts
Re: Support for ASP.NET Dynamic Data Entities Website project template
Jan 15, 2018 08:54 AM|Brando ZWZ|LINK
Hi rodchar,
According to this article, ASP.NET MVC 4 scaffolding does not support Entity Framework 6 or higher. Support of scaffolding of Entity Framework 6 is targeted for the next release of ASP.NET MVC.
Best Regards,
Brando
All-Star
17916 Points
5681 Posts
MVP
Re: Support for ASP.NET Dynamic Data Entities Website project template
Jan 15, 2018 03:49 PM|sjnaughton|LINK
Actually there is support for EF6 but not 7 you need a NuGet package to make it work, as the EndityDataSources it what causes the issues see Dynamic Data provider and EntityDataSource control for Entity Framework 6.
The NuGet package is here:
Microsoft.AspNet.EntityDataSource
Hope that helps.
There is one issue the OnSavingChanges is never called by the EntityDataSource replacement that the NuGet package introduces so you wont be able to process anything in there from DD.
Always seeking an elegant solution.