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

Choose Your Database Objects Dialog Box (Update Model Wizard)

The Choose Your Database Objects dialog box is part of the Update Model Wizard. You can start the Update Model Wizard by right-clicking an empty space of the Entity Data Model Designer surface or anywhere in the Model Browser window and selecting Update Model from Database. Three tabs, Add, Refresh, and Delete, are visible in the Choose Your Database Objects dialog box. This topic summarizes the functionality of each tab. For details about the changes the Update Model Wizard makes to an .edmx file, see Changes Made to an .edmx File by the Update Model Wizard.

Tab Description

Add

Displays a tree view of database objects that are not represented in the current storage model. When you select an object to add, the Update Model Wizard makes changes to the conceptual model, storage model, and mappings.

If you do not want the wizard to apply English language rules for singulars and plurals to Entity, EntitySet, and NavigationProperty names, clear the Pluralize or singularize generated object names checkbox. If you proceed with the checkbox checked, the wizard will do the following for newly added items:

  • Make all EntityType names singular.

  • Make all EntitySet names plural.

  • For each NavigationProperty that returns at most one entity, make the name singular.

  • For each NavigationProperty that returns more than one entity, make the name plural.

    NoteNote
    The Entity Data Model Wizard applies English language rules for singulars and plurals by creating a PluralizationService and passing it to an EntityModelSchemaGenerator.

If you do not want the wizard to generate properties on entity types that correspond to foreign key columns in the database, clear the Include foreign key columns in the model checkbox. For information about working with foreign keys in a conceptual model, see Defining and Managing Relationships (Entity Framework) and ReferentialConstraint Element (CSDL).

NoteNote
If a database table contains only foreign keys (sometimes called a pure join table), the wizard will not generate a corresponding entity type nor will it generate properties on related entity types that correspond to the foreign keys. Instead, a many-to-many association will be generated between the two entity types that the pure join table links.

Refresh

Displays a tree view of all objects that are present in both the database and the storage model. Definitions for all items shown here will be overwritten in the storage model.

Delete

This tab displays a tree view of all objects that are in the storage model, but not in the database. All items shown here will be deleted from the storage model.

NoteNote

When you refresh and delete objects, changes are only made to the storage model. Any changes you want to make to the conceptual model and mappings must be made manually. For information about defining a conceptual model manually, see Modeling and Mapping (Entity Framework).

See Also

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