MyDaftQuestions
MyDaftQuestions

Reputation: 4691

Entity Framework - No option to view tables

enter image description here

I have an issue with EF 6. My database already has tables, so I'm not using code-first.

In the data connections, I can expand tables and see everything.

When I try update model from database and add the tables, I have no option.

Usually the tables has a tree view, but there isn't one. If I open the refresh tab, I can see the tables.

I cannot even check the tables check box in the Update wizard

After I click OK, I see an empty entity data model designer.

When I expand the database in Data Connections, it connects. As soon as I try via the entity data model designer, the database in the DataConnections shows as offline...

I then deleted the .edmx file and all associated files. I then re-added, re-created a new connection string etc with a new Entities name. It works fine for a while. I can't clarify what for a while means. It may be after I try to update the .edmx file (via the wizard) a few times it begins to fail.

What can I do to fix this?

Upvotes: 2

Views: 346

Answers (1)

glant
glant

Reputation: 479

In Database first if updating from the database and If tables are already showing under the refresh tab that means EF Edmx already has it. Delete models from EF Edmx file, save the file and it should ask you run the custom tool, which you need to and and try updating from database again. Good idea would to make copies of the first :)

Upvotes: 2

Related Questions