Create Your MVC application

Next, a new window will pop up for selecting the template. We are going choose Web API template and click OK.

After creating our project, we are going to add the ADO.NET Entity Data Model.

Adding ADO.NET Entity Data Model

To add the ADO.NET Entity Framework, right click on the project name, click Add > Add New Item. A dialog box will pop up. Inside this box, select Visual C# Data then ADO.NET Entity Data Model, and enter a name for your Dbcontext model, such as CustomerModel, and finally click Add.

Next, we need to choose model contain for the EF Designer from the database.

As you can see below, we need to select a server name, then, via a drop down list, connect it to a database panel. You should choose your database name. Finally, click OK.

Now, the Entity Data Model Wizard window will pop up for choosing an object which we need to use. In our case, we are going to choose Customers table and click Finish. Finally, we see that the EDMX model generates a Customer class.