EF 6 + MVC Getting Started


Create ASP.NET MVC Application

The easiest way to create ASP.NET application is to open Visual Studio and create a C# web project using the ASP.NET Web Application (.NET Framework) template.

Name the project MvcWithEF6Demo and select OK.

In New ASP.NET Web Application - MvcWithEF6Demo, select MVC.

Install Entity Framework 6

Entity Framework (EF6) is available as a nuget package and you can install it using Nuget Package Manager.

In the Package Manager Console window, enter the following command.

PM> Install-Package EntityFramework

You can also install EF6 by select the project in Solution Explorer.

Right click on your project and select Manage Nuget Packages....

Search for Entity Framework and install the latest version by pressing the install button. You are now ready to start your application.