Getting Started: Installing EF Core

Intermediate Updated May 20, 2025

🛠️ Getting Started: Installing EF Core

Before using EF Core, you must install the necessary packages. Below is an example for a typical SQL Server-based project.

🔧 Installation (SQL Server)

Use the .NET CLI:

dotnet add package Microsoft.EntityFrameworkCore.SqlServer
dotnet add package Microsoft.EntityFrameworkCore.Tools

If using PostgreSQL, install the Npgsql provider instead:

dotnet add package Npgsql.EntityFrameworkCore.PostgreSQL