Create the project
Creating and setting up the project
1) Change to the directory of your choice and create a project called EFGetStarted
dotnet new console -o EFGetStarted
cd EFGetStarted
2) Install dotnet ef
the global CLI tool for working with entity framework tool set
Refer this link for details
3) Install entity framework core SQL Server package for the current project, the command is documented here if you need to refer to it
dotnet add package Microsoft.EntityFrameworkCore.SqlServer
4) Install entity framework core design library package for the current project, we will need this later
dotnet add package Microsoft.EntityFrameworkCore.Design
5) verify the installations by listing the packages in the project
dotnet list package
output
Project 'EFGetStarted' has the following package references
[net7.0]:
Top-level Package Requested Resolved
> Microsoft.EntityFrameworkCore.Design 7.0.1 7.0.1
> Microsoft.EntityFrameworkCore.SqlServer 7.0.1 7.0.1
We are now good to go to the next step!
Last updated