EF 6 + MVC Getting Started

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Insert
> Step 2: And Like the video. BONUS: You can also share it!

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.

image

Name the project MvcWithEF6Demo and select OK.

image

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.

image

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

image

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



Got any EF 6 + MVC Question?