Update Model Wizard
The ADO.NET Update Model Wizard is used to update an Entity Data Model (EDM) after changes have been made to the underlying database.
The Update Model Wizard starts after you right-click the .edmx file in the Model Browser window and select Update Model from Database. The Update Model Wizard displays three tabs in the Choose Your Database Objects dialog box:
Tab | Description |
---|---|
Add |
Enables you to choose which new database objects you want to add to the EDM. |
Refresh |
Displays a tree view of all database objects whose definitions will be refreshed in the storage model. |
Delete |
Displays a tree view of all database objects that will be deleted from the storage model. |
The Update Model Wizard does the following:
If an object has been deleted from the database, the wizard removes the object from the storage model. Mapping specifications are updated so that objects in the conceptual model are not mapped to storage elements that no longer exist. Existing conceptual model objects are not deleted.
If an object has been added to the database (or was not included in the previous model), you can choose to add the object to the model. The storage model is updated with the newly-added object. In the case of a table or view (but not a stored procedure), a corresponding entity type is created and mapped to the object.
If an object has been updated, the wizard updates the object definition in the storage model. If any new columns have been added to a table or view, the corresponding entity types are updated with matching properties. If the corresponding entity types are part of an inheritance hierarchy, only the affected entity closest to the root of the hierarchy is updated with matching properties. This prevents child entities in the hierarchy from defining the same properties as their ancestors.
In This Section
- Choose Your Database Objects Dialog Box (Update Wizard)
Provides details about the Add, Refresh, and Delete options.
- Changes Made to an EDM by the Update Model Wizard
Provides details about the changes that the Update Model Wizard makes to an EDM.
See Also
Tasks
How to: Update an EDM when the Database Changes