Partilhar via


Using the Entity Data Model Tools

The ADO.NET Entity Data Model Tools help you build Entity Framework applications. With the Entity Data Model Tools you can create a conceptual model from an existing database and then graphically visualize and edit your conceptual model. Or, you can graphically create a conceptual model first, and then generate a database that supports your model. In either case, you can automatically update your model when the underlying database changes and automatically generate object-layer code for your application.

Note

Database generation and object-layer code generation are customizable. For more information, see How to: Customize Object-Layer Code Generation and How to: Customize Database Generation.

The Entity Data Model Tools enables you to automatically modify an .edmx file, which contains conceptual model, storage model, and mapping content. For more information, see CSDL, SSDL, and MSL Specifications.

For information about specific scenarios and tasks with the Entity Data Model Tools, see Scenarios, Tasks, and Implementing Advanced Features.

Entity Data Model Wizard

The Entity Data Model Wizard generates an .edmx file. You can create a conceptual model, storage model, and mappings from an existing database. Or, you can create an empty .edmx file and use the Entity Data Model Designer to create a conceptual model. The Generate Database Wizard can create a storage model, mappings, and a database script from the conceptual model.

Entity Data Model Designer

The ADO.NET Entity Data Model Designer (Entity Designer) 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 works together with the Entity Data Model Wizard, the Update Model Wizard, and the Generate Database Wizard to allow you to generate, edit, and update an .edmx file.

Update Model Wizard

The Update Model Wizard updates an .edmx file after changes have been made to the underlying database.

Generate Database Wizard

The Generate Database Wizard generates a storage model, mappings, and data definition language (DDL) for creating a database from an existing conceptual model. The wizard allows you to do conceptual modeling first then create a database that supports the model.

See Also

Reference

EDM Generator (EdmGen.exe)

Other Resources

Modeling and Mapping