Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Update Model Wizard

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

The ADO.NET Update Model Wizard is used to update an .edmx file after changes have been made to the underlying database. (For more inormation about .edmx files, see .edmx File Overview.)

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 .edmx file.

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.

Cc716705.note(en-us,VS.110).gifNote:
If you delete an object from the conceptual model and then want to use the Update Model Wizard to add the object back to the model, you must first delete the object from the storage model. For more information see How to: Delete Objects from the Storage Model.

Beginning with Visual Studio 2010, the Choose Your Database Objects dialog box also allows you to perform the following customizations:

  • Apply English-language rules for singulars and plurals to entity, entity set, and navigation property names when the .edmx file is generated.

  • Include foreign key columns as properties on entity types.

For more information, see Choose Your Database Objects Dialog Box (Entity Data Model Wizard).

In This Section

Choose Your Database Objects Dialog Box (Update Model Wizard)
Provides details about the Add, Refresh, and Delete options.

Changes Made to an .edmx File by the Update Model Wizard
Provides details about the changes that the Update Model Wizard makes to an .edmx file.

See Also




Build Date: 2011-09-01
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.