Microsoft.EntityFrameworkCore 10.0.1

Prefix Reserved

Requires NuGet 3.6 or higher.

dotnet add package Microsoft.EntityFrameworkCore --version 10.0.1
                    
NuGet\Install-Package Microsoft.EntityFrameworkCore -Version 10.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="10.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="10.0.1" />
                    
Directory.Packages.props
<PackageReference Include="Microsoft.EntityFrameworkCore" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Microsoft.EntityFrameworkCore --version 10.0.1
                    
#r "nuget: Microsoft.EntityFrameworkCore, 10.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Microsoft.EntityFrameworkCore@10.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Microsoft.EntityFrameworkCore&version=10.0.1
                    
Install as a Cake Addin
#tool nuget:?package=Microsoft.EntityFrameworkCore&version=10.0.1
                    
Install as a Cake Tool

Entity Framework Core (EF Core) is a modern object-database mapper that lets you build a clean, portable, and high-level data access layer with .NET (C#) across a variety of databases, including SQL Server (on-premises and Azure), SQLite, MySQL, PostgreSQL, Oracle, and Azure Cosmos DB. It supports LINQ queries, change tracking, updates, and schema migrations.

Getting started

Prerequisites

Make sure to install the same version of all EF Core packages shipped by Microsoft. For example, if version 5.0.3 of Microsoft.EntityFrameworkCore.SqlServer is installed, then all other Microsoft.EntityFrameworkCore.* packages must also be at 5.0.3.

Usage

To use Microsoft.EntityFrameworkCore in your application, you will typically need to create a class that inherits from DbContext, which represents your database session. You can then define classes that represent your database entities, and use LINQ queries to interact with the database.

Here's an example of how you might define a database context and an entity:

using Microsoft.EntityFrameworkCore;

public class MyDbContext : DbContext
{
    public DbSet<Customer> Customers { get; set; }
}

public class Customer
{
    public int Id { get; set; }
    public string Name { get; set; }
}

You can then use the MyDbContext class to interact with the database:

using var context = new MyDbContext();

// Add a new customer
context.Customers.Add(new Customer { Name = "John Doe" });
context.SaveChanges();

// Retrieve all customers
var customers = context.Customers.ToList();

Microsoft.EntityFrameworkCore supports multiple database providers, including SQL Server, MySQL, PostgreSQL, SQLite, and others. You will need to install the provider package for your chosen database. For example, to use SQL Server, you would install the Microsoft.EntityFrameworkCore.SqlServer package.

You would then configure your database context to use the SQL Server provider:

using Microsoft.EntityFrameworkCore;

public class MyDbContext : DbContext
{
    protected override void OnConfiguring(DbContextOptionsBuilder options)
        => options.UseSqlServer(@"Data Source=(localdb)\MSSQLLocalDB;Initial Catalog=MyDatabase");

    public DbSet<Customer> Customers { get; set; }
}

public class Customer
{
    public int Id { get; set; }
    public string Name { get; set; }
}

Additional documentation

Feedback

If you have a specific question about using these projects, we encourage you to ask it on Stack Overflow. If you encounter a bug or would like to request a feature, submit an Github issue. For more details, see getting support.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (10.0K)

Showing the top 5 NuGet packages that depend on Microsoft.EntityFrameworkCore:

Package Downloads
Microsoft.EntityFrameworkCore.Relational

Shared Entity Framework Core components for relational database providers.

Microsoft.EntityFrameworkCore.InMemory

In-memory database provider for Entity Framework Core (to be used for testing purposes).

Npgsql.EntityFrameworkCore.PostgreSQL

PostgreSQL/Npgsql provider for Entity Framework Core.

Microsoft.VisualStudio.Web.CodeGenerators.Mvc

Code Generators for ASP.NET Core MVC. Contains code generators for MVC Controllers and Views.

Microsoft.VisualStudio.Web.CodeGeneration.Design

Code Generation tool for ASP.NET Core. Contains the dotnet-aspnet-codegenerator command used for generating controllers and views.

GitHub repositories (675)

Showing the top 20 popular GitHub repositories that depend on Microsoft.EntityFrameworkCore:

Repository Stars
abpframework/abp
Open-source web application framework for ASP.NET Core! Offers an opinionated architecture to build enterprise software solutions with best practices on top of the .NET. Provides the fundamental infrastructure, cross-cutting-concern implementations, startup templates, application modules, UI themes, tooling and documentation.
kgrzybek/modular-monolith-with-ddd
Full Modular Monolith application with Domain-Driven Design approach.
dotnet/AspNetCore.Docs
Documentation for ASP.NET Core
aspnetboilerplate/aspnetboilerplate
ASP.NET Boilerplate - Web Application Framework
dodyg/practical-aspnetcore
Practical samples of ASP.NET Core 10, 9, 8.0, 7.0, 6.0, 5.0, 3.1, 2.2, and 2.1,projects you can use. Readme contains explanations on all projects.
davidfowl/AspNetCoreDiagnosticScenarios
This repository has examples of broken patterns in ASP.NET Core applications
RayWangQvQ/BiliBiliToolPro
B 站(bilibili)自动任务工具,支持docker、青龙、k8s等多种部署方式。敏感肌也能用。
btcpayserver/btcpayserver
Accept Bitcoin payments. Free, open-source & self-hosted, Bitcoin payment processor.
EduardoPires/EquinoxProject
Web Application ASP.NET 9 using Clean Architecture, DDD, CQRS, Event Sourcing and a lot of good practices
fullstackhero/dotnet-starter-kit
Production Grade Cloud-Ready .NET 10 Starter Kit (Web API + Blazor Client) with Multitenancy Support, and Clean/Modular Architecture that saves roughly 200+ Development Hours! All Batteries Included.
ldqk/Masuit.Tools
全龄段友好的C#万能工具库,码数吐司库,包含一些常用的操作类,大都是静态类,加密解密,反射操作,权重随机筛选算法,分布式短id,表达式树,linq扩展,文件压缩,多线程下载,硬件信息,字符串扩展方法,日期时间扩展操作,中国农历,大文件拷贝,图像裁剪,验证码,断点续传,集合扩展、Excel导出等常用封装。诸多功能集一身,代码量不到2MB!
graphql-dotnet/graphql-dotnet
GraphQL for .NET
danielgerlag/workflow-core
Lightweight workflow engine for .NET Standard
ChilliCream/graphql-platform
Welcome to the home of the Hot Chocolate GraphQL server for .NET, the Strawberry Shake GraphQL client for .NET and Nitro the awesome Monaco based GraphQL IDE.
jasontaylordev/NorthwindTraders
Northwind Traders is a sample application built using ASP.NET Core and Entity Framework Core.
immense/Remotely
A remote control and remote scripting solution, built with .NET 8, Blazor, and SignalR.
DearVa/Everywhere
A context-aware AI assistant for your desktop. Ready to respond intelligently, seamlessly integrating multiple LLMs and MCP tools.
MapsterMapper/Mapster
A fast, fun and stimulating object to object Mapper
microsoft/fluentui-blazor
Microsoft Fluent UI Blazor components library. For use with ASP.NET Core Blazor applications
dotnetcore/Util
Util是一个.Net平台下的应用框架,旨在提升中小团队的开发能力,由工具类、分层架构基类、Ui组件,配套代码生成模板,权限等组成。
Version Downloads Last Updated
10.0.1 1,646,400 12/9/2025
10.0.0 3,361,325 11/11/2025
10.0.0-rc.2.25502.107 333,896 10/14/2025
10.0.0-rc.1.25451.107 164,978 9/9/2025
10.0.0-preview.7.25380.108 54,404 8/12/2025
10.0.0-preview.6.25358.103 18,971 7/15/2025
10.0.0-preview.5.25277.114 65,251 6/6/2025
10.0.0-preview.4.25258.110 31,029 5/12/2025
10.0.0-preview.3.25171.6 22,425 4/10/2025
10.0.0-preview.2.25163.8 91,011 3/18/2025
10.0.0-preview.1.25081.1 15,429 2/25/2025
9.0.11 2,416,964 11/11/2025
9.0.10 5,825,535 10/14/2025
9.0.9 8,418,367 9/9/2025
9.0.8 7,967,553 8/5/2025
9.0.7 6,517,219 7/8/2025
9.0.6 7,292,883 6/10/2025
9.0.5 8,992,129 5/13/2025
9.0.4 11,173,825 4/8/2025
9.0.3 9,688,768 3/11/2025
9.0.2 10,812,870 2/11/2025
9.0.1 29,050,665 1/14/2025
9.0.0 31,648,342 11/12/2024
9.0.0-rc.2.24474.1 253,221 10/8/2024
9.0.0-rc.1.24451.1 157,845 9/10/2024
9.0.0-preview.7.24405.3 118,649 8/13/2024
9.0.0-preview.6.24327.4 245,783 7/9/2024
9.0.0-preview.5.24306.3 74,545 6/11/2024
9.0.0-preview.4.24267.1 76,703 5/21/2024
9.0.0-preview.3.24172.4 193,712 4/11/2024
9.0.0-preview.2.24128.4 92,495 3/12/2024
9.0.0-preview.1.24081.2 150,447 2/13/2024
8.0.22 1,722,612 11/11/2025
8.0.21 1,565,823 10/14/2025
8.0.20 2,292,911 9/9/2025
8.0.19 3,598,489 8/5/2025
8.0.18 2,306,582 7/8/2025
8.0.17 3,920,998 6/10/2025
8.0.16 3,723,437 5/13/2025
8.0.15 5,087,481 4/8/2025
8.0.14 6,455,142 3/11/2025
8.0.13 9,161,598 2/11/2025
8.0.12 7,432,304 1/14/2025
8.0.11 33,964,398 11/12/2024
8.0.10 31,668,693 10/8/2024
8.0.8 36,526,670 8/13/2024
8.0.7 21,532,854 7/9/2024
8.0.6 23,852,640 5/28/2024
8.0.5 9,905,757 5/14/2024
8.0.4 39,269,972 4/9/2024
8.0.3 15,106,158 3/12/2024
8.0.2 32,401,210 2/13/2024
8.0.1 19,696,867 1/9/2024
8.0.0 68,966,816 11/14/2023
8.0.0-rc.2.23480.1 596,819 10/10/2023
8.0.0-rc.1.23419.6 165,381 9/12/2023
8.0.0-preview.7.23375.4 137,560 8/8/2023
8.0.0-preview.6.23329.4 250,767 7/11/2023
8.0.0-preview.5.23280.1 220,949 6/13/2023
8.0.0-preview.4.23259.3 152,047 5/16/2023
8.0.0-preview.3.23174.2 345,351 4/11/2023
8.0.0-preview.2.23128.3 205,085 3/14/2023
8.0.0-preview.1.23111.4 144,209 2/21/2023
7.0.20 5,815,240 5/28/2024
7.0.19 662,136 5/14/2024
7.0.18 3,093,981 4/9/2024
7.0.17 1,875,398 3/12/2024
7.0.16 2,401,404 2/13/2024
7.0.15 3,735,907 1/9/2024
7.0.14 6,899,750 11/14/2023
7.0.13 8,086,512 10/24/2023
7.0.12 4,842,153 10/10/2023
7.0.11 15,875,220 9/12/2023
7.0.10 10,849,932 8/8/2023
7.0.9 10,221,132 7/11/2023
7.0.8 6,113,267 6/22/2023
7.0.7 4,180,422 6/13/2023
7.0.5 28,883,206 4/11/2023
7.0.4 10,115,063 3/14/2023
7.0.3 15,090,454 2/14/2023
7.0.2 20,939,850 1/10/2023
7.0.1 11,263,099 12/13/2022
7.0.0 38,281,394 11/7/2022
7.0.0-rc.2.22472.11 237,914 10/11/2022
7.0.0-rc.1.22426.7 224,786 9/14/2022
7.0.0-preview.7.22376.2 106,656 8/9/2022
7.0.0-preview.6.22329.4 80,820 7/12/2022
7.0.0-preview.5.22302.2 67,438 6/14/2022
7.0.0-preview.4.22229.2 94,808 5/10/2022
7.0.0-preview.3.22175.1 80,151 4/13/2022
7.0.0-preview.2.22153.1 87,569 3/14/2022
7.0.0-preview.1.22076.6 60,445 2/17/2022
6.0.36 3,357,755 11/12/2024
6.0.35 1,030,286 10/8/2024
6.0.33 2,591,657 8/13/2024
6.0.32 1,025,363 7/9/2024
6.0.31 1,364,576 5/28/2024
6.0.30 770,883 5/14/2024
6.0.29 3,545,633 4/9/2024
6.0.28 1,999,073 3/12/2024
6.0.27 2,232,355 2/13/2024
6.0.26 3,079,337 1/9/2024
6.0.25 4,192,995 11/14/2023
6.0.24 2,099,000 10/24/2023
6.0.23 1,378,724 10/10/2023
6.0.22 3,758,294 9/12/2023
6.0.21 3,989,172 8/8/2023
6.0.20 3,208,770 7/11/2023
6.0.19 2,728,770 6/22/2023
6.0.18 1,411,765 6/13/2023
6.0.16 8,291,094 4/11/2023
6.0.15 4,562,817 3/14/2023
6.0.14 5,674,405 2/14/2023
6.0.13 7,492,525 1/10/2023
6.0.12 11,820,338 12/13/2022
6.0.11 10,646,992 11/7/2022
6.0.10 18,676,279 10/11/2022
6.0.9 16,358,935 9/13/2022
6.0.8 19,749,777 8/9/2022
6.0.7 53,505,351 7/12/2022
6.0.6 16,032,903 6/14/2022
6.0.5 24,270,199 5/10/2022
6.0.4 18,986,503 4/11/2022
6.0.3 27,844,132 3/8/2022
6.0.2 21,000,373 2/8/2022
6.0.1 35,697,253 12/14/2021
6.0.0 81,387,316 11/8/2021
6.0.0-rc.2.21480.5 339,596 10/12/2021
6.0.0-rc.1.21452.10 276,682 9/14/2021
6.0.0-preview.7.21378.4 103,978 8/10/2021
6.0.0-preview.6.21352.1 45,663 7/14/2021
6.0.0-preview.5.21301.9 196,652 6/15/2021
6.0.0-preview.4.21253.1 80,217 5/24/2021
6.0.0-preview.3.21201.2 104,290 4/8/2021
6.0.0-preview.2.21154.2 75,432 3/11/2021
6.0.0-preview.1.21102.2 99,427 2/12/2021
5.0.17 8,761,295 5/10/2022 5.0.17 is deprecated because it is no longer maintained.
5.0.16 1,592,026 4/11/2022 5.0.16 is deprecated because it is no longer maintained.
5.0.15 2,461,815 3/8/2022 5.0.15 is deprecated because it is no longer maintained.
5.0.14 2,470,113 2/8/2022 5.0.14 is deprecated because it is no longer maintained.
5.0.13 4,746,970 12/14/2021 5.0.13 is deprecated because it is no longer maintained.
5.0.12 5,076,345 11/7/2021 5.0.12 is deprecated because it is no longer maintained.
5.0.11 8,836,198 10/12/2021 5.0.11 is deprecated because it is no longer maintained.
5.0.10 14,357,300 9/14/2021 5.0.10 is deprecated because it is no longer maintained.
5.0.9 10,893,901 8/10/2021 5.0.9 is deprecated because it is no longer maintained.
5.0.8 10,324,855 7/13/2021 5.0.8 is deprecated because it is no longer maintained.
5.0.7 15,410,966 6/8/2021 5.0.7 is deprecated because it is no longer maintained.
5.0.6 8,608,948 5/11/2021 5.0.6 is deprecated because it is no longer maintained.
5.0.5 12,084,868 4/6/2021 5.0.5 is deprecated because it is no longer maintained.
5.0.4 8,744,476 3/9/2021 5.0.4 is deprecated because it is no longer maintained.
5.0.3 8,351,143 2/9/2021 5.0.3 is deprecated because it is no longer maintained.
5.0.2 10,854,417 1/12/2021 5.0.2 is deprecated because it is no longer maintained.
5.0.1 16,913,895 12/8/2020 5.0.1 is deprecated because it is no longer maintained.
5.0.0 29,202,795 11/9/2020 5.0.0 is deprecated because it is no longer maintained.
5.0.0-rc.2.20475.6 393,426 10/13/2020
5.0.0-rc.1.20451.13 324,391 9/14/2020
5.0.0-preview.8.20407.4 211,438 8/25/2020
5.0.0-preview.7.20365.15 120,009 7/21/2020
5.0.0-preview.6.20312.4 65,226 6/25/2020
5.0.0-preview.5.20278.2 51,833 6/10/2020
5.0.0-preview.4.20220.10 75,125 5/18/2020
5.0.0-preview.3.20181.2 95,959 4/23/2020
5.0.0-preview.2.20159.4 63,419 4/2/2020
5.0.0-preview.2.20120.8 46,651 3/16/2020
3.1.32 8,629,836 12/13/2022
3.1.31 1,940,802 11/8/2022
3.1.30 914,634 10/11/2022
3.1.29 1,604,040 9/13/2022
3.1.28 1,002,814 8/9/2022
3.1.27 877,776 7/12/2022
3.1.26 749,154 6/14/2022
3.1.25 1,202,140 5/10/2022
3.1.24 712,525 4/11/2022
3.1.23 1,153,229 3/8/2022
3.1.22 4,019,081 12/14/2021
3.1.21 2,789,270 11/7/2021
3.1.20 1,802,271 10/11/2021
3.1.19 2,622,293 9/14/2021
3.1.18 6,083,485 8/10/2021
3.1.17 2,026,630 7/13/2021
3.1.16 2,515,871 6/8/2021
3.1.15 3,144,873 5/11/2021
3.1.14 3,303,717 4/6/2021
3.1.13 4,996,103 3/9/2021
3.1.12 3,158,090 2/9/2021
3.1.11 5,722,425 1/12/2021
3.1.10 8,690,932 11/9/2020
3.1.9 12,592,048 10/13/2020
3.1.8 18,291,608 9/8/2020
3.1.7 10,683,202 8/11/2020
3.1.6 11,309,583 7/14/2020
3.1.5 13,378,403 6/9/2020
3.1.4 18,807,330 5/12/2020
3.1.3 29,436,599 3/24/2020
3.1.2 12,398,108 2/19/2020
3.1.1 21,218,027 1/14/2020
3.1.0 36,584,165 12/3/2019
3.1.0-preview3.19554.8 172,636 11/13/2019
3.1.0-preview2.19525.5 33,659 11/1/2019
3.1.0-preview1.19506.2 799,530 10/15/2019
3.0.3 213,438 2/19/2020
3.0.2 95,202 1/14/2020
3.0.1 1,471,056 11/18/2019
3.0.0 20,069,749 9/23/2019
3.0.0-rc1.19456.14 47,596 9/16/2019
3.0.0-preview9.19423.6 1,407,594 9/4/2019
3.0.0-preview8.19405.11 444,371 8/13/2019
3.0.0-preview7.19362.6 100,697 7/23/2019
3.0.0-preview6.19304.10 176,784 6/12/2019
3.0.0-preview5.19227.1 723,013 5/6/2019
3.0.0-preview4.19216.3 23,452 4/18/2019
3.0.0-preview3.19153.1 211,298 3/6/2019
3.0.0-preview.19074.3 33,378 1/29/2019
3.0.0-preview.18572.1 49,556 12/3/2018
2.3.0 85,568 1/14/2025
2.2.6 33,202,205 7/9/2019 2.2.6 is deprecated because it is no longer maintained.
2.2.4 20,191,202 4/9/2019 2.2.4 is deprecated because it is no longer maintained.
2.2.3 5,493,048 3/11/2019 2.2.3 is deprecated because it is no longer maintained.
2.2.2 6,644,226 2/12/2019 2.2.2 is deprecated because it is no longer maintained.
2.2.1 7,069,217 1/8/2019 2.2.1 is deprecated because it is no longer maintained.
2.2.0 23,346,458 12/3/2018 2.2.0 is deprecated because it is no longer maintained.
2.2.0-preview3-35497 187,539 10/17/2018
2.2.0-preview2-35157 159,235 9/12/2018
2.2.0-preview1-35029 86,933 8/22/2018
2.1.14 4,222,124 11/18/2019
2.1.11 3,801,670 5/14/2019
2.1.8 4,002,144 2/12/2019
2.1.4 15,979,585 10/1/2018
2.1.3 5,042,631 9/11/2018
2.1.2 8,316,504 8/21/2018
2.1.1 18,271,138 6/18/2018
2.1.0 13,799,761 5/29/2018
2.1.0-rc1-final 232,967 5/6/2018
2.1.0-preview2-final 219,291 4/10/2018
2.1.0-preview1-final 330,069 2/26/2018
2.0.3 5,667,132 5/7/2018 2.0.3 is deprecated because it is no longer maintained.
2.0.2 6,971,956 3/13/2018 2.0.2 is deprecated because it is no longer maintained.
2.0.1 13,076,640 11/14/2017 2.0.1 is deprecated because it is no longer maintained.
2.0.0 29,028,013 8/11/2017 2.0.0 is deprecated because it is no longer maintained.
2.0.0-preview2-final 99,836 6/28/2017 2.0.0-preview2-final is deprecated because it is no longer maintained.
2.0.0-preview1-final 1,167,553 5/10/2017 2.0.0-preview1-final is deprecated because it is no longer maintained.
1.1.6 6,515,182 7/10/2018 1.1.6 is deprecated because it is no longer maintained.
1.1.5 1,299,358 12/12/2017 1.1.5 is deprecated because it is no longer maintained.
1.1.4 247,264 11/14/2017 1.1.4 is deprecated because it is no longer maintained.
1.1.3 326,192 9/20/2017 1.1.3 is deprecated because it is no longer maintained.
1.1.2 5,393,407 5/9/2017 1.1.2 is deprecated because it is no longer maintained.
1.1.1 3,500,070 3/6/2017 1.1.1 is deprecated because it is no longer maintained.
1.1.0 8,541,474 11/16/2016 1.1.0 is deprecated because it is no longer maintained.
1.1.0-preview1-final 48,208 10/24/2016 1.1.0-preview1-final is deprecated because it is no longer maintained.
1.0.6 70,128 11/14/2017 1.0.6 is deprecated because it is no longer maintained.
1.0.5 57,729 9/20/2017 1.0.5 is deprecated because it is no longer maintained.
1.0.4 73,396 5/9/2017 1.0.4 is deprecated because it is no longer maintained.
1.0.3 754,932 3/6/2017 1.0.3 is deprecated because it is no longer maintained.
1.0.2 92,043 12/12/2016 1.0.2 is deprecated because it is no longer maintained.
1.0.1 925,767 9/13/2016 1.0.1 is deprecated because it is no longer maintained.
1.0.0 2,254,927 6/27/2016 1.0.0 is deprecated because it is no longer maintained.
1.0.0-rc2-final 150,315 5/16/2016 1.0.0-rc2-final is deprecated because it is no longer maintained.