Entity Framework 6 not updating from database correctly in VS 2019

entity-framework-6 visual-studio-2019

Question

I'm working on a .NET MVC web app using Entity Framework 6 to manage a model from a SQL Server database. I've been using VS 2017 to develop everything so far, making changes to the database, and updating the model after those changes are made. When I switched to VS 2019 and attempted this, only the model and diagram of the model were updated. The classes generated by EF were not updated with the changes from the database. Does VS 2019 handle EF models differently than 2017?

1
7
4/5/2019 3:24:49 PM

Accepted Answer

According to this thread on VS Developer Community, it will be fixed in VB2019.1, in the meantime there's a workaround:

  1. Save the .edmx file
  2. Expand the .edmx file in Solution Explorer
  3. For each .tt files inside it, right-click and choose Run Custom Tool.
3
4/9/2019 3:44:24 PM

Popular Answer

This is still broken in VS2019.2.1

I've tried in different machines, with SQL Server 2019 and 2016, and even back with VS2017. Entities are generated but I have 208 compilation errors.

Some help please



Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow