Generating Data Model Based on Relational Database

The ADO.NET Entity Framework and Visual Studio, make it possible to create a data entity model, based on a database, in a few simple steps.

Step 1: In the solution explorer of Visual Studio, right click on a project, and select add new item from the menu. This will present the add new item dialogue box. Click on data templates, and select the ADO.NET Entity Data Model, as illustrated below.

ADO.NET Entity Framework Data Model Add New Item

 

Step 2: Next, the Entity Data Model Wizard launches, and asks you to select what the model should contain. Take the option to generate from database and click next.

ADO.NET Entity Framework Data Model Add New Item

Step 3: The Entity Data Model Wizard will ask you to configure the database connection.

ADO.NET Entity Framework Data Model Add New Item

Step 4: Select the tables from the database to be included in the data entity model. Click finish, and the data entity model, with supporting diagram and source code files, are automatically generated and added to the project solution.

ADO.NET Entity Framework Data Model Add New Item

One thought on “Generating Data Model Based on Relational Database

  1. Pingback: The Data Model Layer | The Lexicon of Software

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">