Entity Data Model Wizard Not Showing New Tables

c# entity-framework sql-server visual-studio-2012


Using Microsoft SQL Server 2012, I established a sql database from scripts, and the entity framework was used to generate certain classes in C#. That database now requires modifications and the addition of several additional components, including new tables and stored procedures.

The Entity Data Model Wizard in Visual Studio Ultimate 2012, however, is still displaying the old database (as it appeared a week ago), including certain tables I deleted, while trying to recreate the classes. There is no mention of the new items. The database has been deleted and recreated, both programs have been restarted, and the computer has been restarted, but to no avail.

I'm using Visual Studio to generate the framework, and I'm doing the following:

  • Add a fresh item to the undertaking.
  • ADO.NET Entity Data Model should be chosen.
  • from the database, choose Code First.
  • Choose Next (the connection string is already filled in).
  • I continue to see the outdated tables in the "Choose Objects and Settings" window on the following screen (and not the new ones).

I changed a database; do I need to do anything additional to get those changes appear in the entity framework?


Although I have a lead on a "Update Model from Database" option, my Visual Studio does not have one. Online searches claim it can be located in the "Model Browser Window," which I have also not discovered in Visual Studio. Further research reveals that opening a "edmx" file makes this window accessible. The results I obtained after searching the entire computer for that file extension were all from other people's efforts. A.edmx file for either the sql database or the c# solution for this project is nowhere to be found.

12/3/2014 7:02:26 PM

Accepted Answer

On the "Choose Your Data Connection" screen of the Entity Data Model Wizard, I selected "New Connection" instead of pressing "Next" with the existing connection. The new tables have now shown after selecting the server name and database name and restarting the connection.

I had a hunch that it would be some insignificant, ten-second detail.


The new tables became accessible after redoing the connection, however the stored processes were not. Here's how I made it work.

For some reason, selecting "Code First From Database" in the Model Wizard excludes stored procedures. The right selection for me was "EF Designer from Database." The edmx file that the first option wouldn't create was also generated, in addition to the new tables AND stored procedures.

12/4/2014 10:16:13 PM

Popular Answer


Related Questions


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