Entity Framework Designer
The Entity Framework Designer (Entity Designer) is a tool that enables point-and-click modification of an .edmx file. You can use the Entity Designer to visually create and modify entities, associations, mappings, and inheritance relationships. You can also validate an .edmx file.
The Entity Designer is a tool that is integrated with Visual Studio components. It works together with the Entity Data Model Wizard, Update Model Wizard, and Create Database Wizard to allow you to generate, edit, and update an .edmx file.
The Entity Designer consists of the following components:
A visual design surface for editing the conceptual model. You can create, modify, or delete entities and associations.
A Mapping Details window for viewing and editing mappings. You can map entity types or associations to database tables, columns, and stored procedures.
A Model Browser window that provides tree views of the conceptual model and the storage model.
Toolbox controls for creating entities, associations, and inheritance relationships.
The Entity Designer works with an .edmx file. An .edmx file is the combination of three metadata files: the conceptual schema definition language (CSDL), store schema definition language (SSDL), and mapping specification language (MSL) files. (For more information, see .edmx File Overview.) When you run the Entity Data Model Wizard, an .edmx file is created and added to your solution. This file is automatically opened in the Entity Designer when the Entity Data Model Wizard finishes. You can also open the .edmx file in the Entity Designer by double-clicking it in Solution Explorer.
Model Browser Window
The Model Browser window is a Visual Studio tool window that is integrated with the Entity Designer. It provides a tree view of the conceptual and storage models that are defined in an .edmx file (for more information, see .edmx File Overview). The Model Browser groups information into two nodes.
The first node shows you the conceptual model. By expanding the child nodes, you can view all entity types and associations in the model.
The second node shows you the target database model. By expanding the child nodes, you can see what parts of the database tables, views, and stored procedures have been imported to the model.
The Model Browser enables you to do the following:
Modify properties and mappings. Clicking an item in the Model Browser makes it active in the Properties window and the Mapping Details window. You can use these windows to modify the properties and entity mappings.
Create a function import from a stored procedure.
Update the storage model when changes are made to the underlying database. For more information, see Storage Metadata Schema (SSDL) and How to: Update an .edmx File when the Database Changes.
Delete tables, views, and stored procedures from the storage model. For more information, see Storage Metadata Schema (SSDL) and How to: Delete Objects from the Storage Model.
Locate an entity type on the design surface. In the Model Browser, right-click the entity name in the tree view of the conceptual model and select Show in Designer. The visual representation of the model will be adjusted so that the entity type is visible on the design surface.
Search the tree view of the conceptual and storage models. The search bar at the top of the Model Browser window allows you to search object names for a specified string.
The Model Browser opens when the Entity Designer is opened. If the Model Browser is not visible, right-click the main design surface and select Model Browser.
Mapping Details Window
The Mapping Details window is a Visual Studio component that is integrated with the Entity Designer. Double-click an .edmx file in Solution Explorer to open the Entity Designer. This includes the Mapping Details window. The Mapping Details window shows the mappings of the selected entity type in the currently active window.
|If the Mapping Details window is not visible, right-click the main design surface and select Mapping Details.|
Delete Unmapped Tables and Views Dialog Box
The Delete Unmapped Tables and Views dialog box appears when you use the Entity Designer to delete objects from the conceptual model. When you have selected items on the Entity Designer surface for deletion, the Delete Unmapped Tables and Views dialog box displays the objects in the storage model that will also be deleted and presents you with three options: Yes, No, and Cancel. The following actions are taken for each option:
- Yes: In addition to the objects in the conceptual model that you selected for deletion, all unmapped objects (shown in the dialog box display) are deleted from the storage model. This includes objects in the storage model that were already unmapped, not just objects that have become unmapped as a result of the deleting the selected conceptual model objects.
- No: No objects will be deleted from the storage model. Only the objects in the conceptual model that you selected will be deleted.
- Cancel: The operation is canceled. No objects in the conceptual model or storage model will be deleted.
Other ResourcesEntity Data Model