Skip to main content
net8.0

Microsoft SQL Server database provider for Entity Framework Core.

Published
Oct 8, 2024
2y ago
Total Downloads
1.0B
1,035,375,517

Install

dotnet add package Microsoft.EntityFrameworkCore.SqlServer --version 9.0.0-rc.2.24474.1
ProductVersions
.NET
net8.0

README

Microsoft.EntityFrameworkCore.SqlServer is the EF Core database provider package for Microsoft SQL Server and Azure SQL.

Usage

Call the UseSqlServer method to choose the SQL Server/Azure SQL database provider for your DbContext. For example:

protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
    optionsBuilder.UseSqlServer("Server=(localdb)\\mssqllocaldb;Database=MyDatabase;Trusted_Connection=True;");
}

Getting started with EF Core

See Getting started with EF Core for more information about EF NuGet packages, including which to install when getting started.

Additional documentation

See Microsoft SQL Server EF Core Database Provider for more information about the features of this database provider.

Feedback

If you encounter a bug or issues with this package,you can open an Github issue. For more details, see getting support.

Changes from Previous Version

Adoption Assessment

Workloads standardized on SQL Server or Azure SQL that need mature migrations and provider documentation.

Entity Framework Guide
This version is marked prerelease. Validate its API and upgrade path before production use.Compatibility metadata lists 1 target framework; confirm the exact target used by your application.
Editorial Note: EF Core provider for SQL Server with broad feature support and deep integration with Microsoft data tooling. Trade-off: Ties query behavior and advanced feature usage to SQL Server semantics and version capabilities.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.