In this we will learn how to Add Entity Framework (EF) Core from database in mvc core using package manager console visual studio 2017 and what is Entity Framework (EF) Core.


Here we are going to achieve how to add Entity Framework (EF) Core from database in mvc core using package manager console visual studio 2017. Before starting let’s know what is Entity Framework (EF) Core.

Entity Framework (EF) Core is a lightweight, extensible, and cross-platform version of the popular Entity Framework data access technology. EF Core is an object-relational mapper (O/RM) that enables .NET developers to work with a database using .NET objects.  

To get more information about EF Core, I would recommend you to visit the official documentation here:

Let’s start Update Entity Framework (EF) Core from database.

Goto  > Tools > library package manager> package manager console > click .

Now open a window in bottom of screen then type following command line:

"Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=collage;Data Source=ITD-WS-047"
Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models

The Data Source attribute above is the SQL server instance name. You can find it in SQL Management

Studio by right clicking on your database. For this example, the server name is “ASU-LP05\SQLEXPRESS”.

The Database attribute is your database name. In this case, the database name is


The –OutputDir attribute allows you to specify the location of the files generated. In this

case, we’ve set it To Models.

after executing above code output will be shown like below:


add entity framework core in visual studio 2017

I hope it will help to you.

Leave a comment

Make sure you enter the (*) required information where indicated. HTML code is not allowed.

You may also like