Tables don't show when re-adding them to entity-model (edmx) -
I have db with 5 tables. In the beginning, I've added those tables, but then some relationships have been compiled Decided to remove the reason.
Now, when I want to add them back, I'm opening the edmx file -> Update Model from the database ... I do not see those tables under the App tab, but only "Refresh "Under tab.
How can I add them back?
To re-add a table to your model, first you need to delete the table from your model (A list of tables is visible in the [model.Store] tree (see the ' Model Browser ' panel - you can open it from the right-mouse click menu). Update models run ... 'The table will appear in the' Add 'tab in the first step of' Update Wizard '.
Steps to Complete:
- Open your .edmx file in a text editor.
- Find and delete the elements of the XML unit (see the notes below).
- Open your model in Visual Studio.
- Click the update model from the database.
To remove all references to a table in your model :
- These 'EntityContainer' elements, delete all the 'EntitySet' child elements that set the 'name' attribute to the value [TableNameToReAdd].
- In the 'EntityContainer' element, remove all 'AssociationSet' hair elements an 'end' element exists that sets their 'EntitySet' attribute on Value [TableanamToyed] .
- The 'EntityContaine R' element, delete all the 'EntityType' hair elements in which the 'Name' attribute is set to value [TableNorAyad]
- In the 'Entity Container' element , Remove all 'association' hair elements, where an 'end' element is present which is set to the value of its 'role' attribute on the [valueNameTeReAdd] value.
Comments
Post a Comment