Entity Framework Core - Database First Steps
Entity Framework Core - Database First Steps
(DATABASE FIRST)
ASP.NET Core 7.0 or later
25 JULY 2023
Entity Framework Core Tutorial 25 July 2023
Step #1: Create a New ASP.NET Core Web Application in Visual Studio 2019.
Page | 1
Entity Framework Core Tutorial 25 July 2023
Step #3: In Project Manager Console and add the following command
PM> Scaffold-DbContext "Data Source=DESKTOP-6AVBNVP\SQLEXPRESS;Initial
Catalog=SCBuildersWebsiteDBV2;Integrated Security=True"
Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models
This will all the Generate Models in Models folders as shown below.
Page | 2
Entity Framework Core Tutorial 25 July 2023
Page | 3
Entity Framework Core Tutorial 25 July 2023
Other Migrations
Page | 4