Microsoft.EntityFrameworkCore 9.0.11

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.

Showing the top 20 packages that depend on Microsoft.EntityFrameworkCore.

Packages Downloads
Microsoft.EntityFrameworkCore.Proxies
Lazy loading proxies for Entity Framework Core.
5,503
Microsoft.EntityFrameworkCore.Relational
Shared Entity Framework Core components for relational database providers.
5,494
HotChocolate.Data.EntityFramework
Contains extensions for seamless integration of Entity Framework Core into HotChocolate
5,433
Microsoft.EntityFrameworkCore.Relational
Shared Entity Framework Core components for relational database providers.
2,154
Microsoft.EntityFrameworkCore.Proxies
Lazy loading proxies for Entity Framework Core.
516
HotChocolate.Data.EntityFramework
Contains extensions for seamless integration of Entity Framework Core into HotChocolate
513
Microsoft.EntityFrameworkCore.Relational
Shared Entity Framework Core components for relational database providers.
506
HotChocolate.Data.EntityFramework
Contains extensions for seamless integration of Entity Framework Core into HotChocolate
327
GreenDonut.Data.EntityFramework
This package provides data integrations like pagination, projections, filtering and sorting.
327
Microsoft.EntityFrameworkCore.Proxies
Lazy loading proxies for Entity Framework Core.
302
Microsoft.EntityFrameworkCore.Relational
Shared Entity Framework Core components for relational database providers.
294
Microsoft.EntityFrameworkCore.InMemory
In-memory database provider for Entity Framework Core (to be used for testing purposes).
100
Ardalis.Specification.EntityFrameworkCore
EF Core plugin package to Ardalis.Specification containing EF Core evaluator and abstract repository.
92
Ardalis.Specification.EntityFrameworkCore
EF Core plugin package to Ardalis.Specification containing EF Core evaluator and abstract repository.
81
AspNetCore.HealthChecks.UI.Core
HealthChecks.UI.Core package containing builder and model definitions
81
Microsoft.EntityFrameworkCore.Proxies
Lazy-loading proxies for EF Core. This package was built from the source at: https://github.com/aspnet/EntityFramework.git/tree/cbd2a2074d908673195abbb14de5a460acaa2aea
78
Microsoft.EntityFrameworkCore.Relational
Shared Entity Framework Core components for relational database providers.
77
Microsoft.EntityFrameworkCore.InMemory
In-memory database provider for Entity Framework Core (to be used for testing purposes).
76
Ardalis.Specification.EntityFrameworkCore
EF Core plugin package to Ardalis.Specification containing EF Core evaluator and abstract repository.
76

Version Downloads Last updated
10.0.0 5 11/13/2025
10.0.0-rc.2.25502.107 11 10/15/2025
10.0.0-rc.1.25451.107 11 09/13/2025
10.0.0-preview.7.25380.108 10 08/14/2025
10.0.0-preview.6.25358.103 16 07/16/2025
10.0.0-preview.5.25277.114 25 06/14/2025
10.0.0-preview.4.25258.110 22 05/13/2025
10.0.0-preview.3.25171.6 28 04/11/2025
10.0.0-preview.2.25163.8 33 03/25/2025
10.0.0-preview.1.25081.1 34 02/26/2025
9.0.11 7 11/11/2025
9.0.10 5 10/16/2025
9.0.9 10 09/11/2025
9.0.8 21 08/06/2025
9.0.7 13 07/11/2025
9.0.6 27 06/12/2025
9.0.5 25 05/16/2025
9.0.4 28 04/12/2025
9.0.3 29 03/14/2025
9.0.2 27 02/13/2025
9.0.1 33 01/17/2025
9.0.0 41 11/13/2024
9.0.0-rc.2.24474.1 43 10/16/2024
9.0.0-rc.1.24451.1 44 09/10/2024
9.0.0-preview.7.24405.3 43 08/15/2024
9.0.0-preview.6.24327.4 55 07/10/2024
9.0.0-preview.5.24306.3 52 06/12/2024
9.0.0-preview.4.24267.1 42 05/24/2024
9.0.0-preview.3.24172.4 43 04/13/2024
9.0.0-preview.2.24128.4 54 03/21/2024
9.0.0-preview.1.24081.2 47 02/18/2024
8.0.22 5 11/13/2025
8.0.21 8 10/15/2025
8.0.20 14 09/10/2025
8.0.19 17 08/06/2025
8.0.18 16 07/12/2025
8.0.17 19 06/12/2025
8.0.16 28 05/15/2025
8.0.15 30 04/10/2025
8.0.14 32 03/14/2025
8.0.13 30 02/13/2025
8.0.12 32 01/20/2025
8.0.11 33 11/13/2024
8.0.10 41 10/12/2024
8.0.8 42 08/15/2024
8.0.7 43 07/14/2024
8.0.6 48 05/29/2024
8.0.5 43 05/15/2024
8.0.4 48 04/11/2024
8.0.3 48 03/13/2024
8.0.2 5,508 02/17/2024
8.0.1 299 01/17/2024
8.0.0 5,736 11/14/2023
8.0.0-rc.2.23480.1 50 10/10/2023
8.0.0-rc.1.23419.6 58 09/14/2023
8.0.0-preview.7.23375.4 62 08/25/2023
8.0.0-preview.6.23329.4 62 07/12/2023
8.0.0-preview.5.23280.1 61 06/20/2023
8.0.0-preview.4.23259.3 58 05/18/2023
8.0.0-preview.3.23174.2 71 04/28/2023
8.0.0-preview.2.23128.3 515 04/03/2023
8.0.0-preview.1.23111.4 58 06/29/2023
7.0.20 42 05/29/2024
7.0.19 48 05/15/2024
7.0.18 52 04/11/2024
7.0.17 58 03/13/2024
7.0.16 51 02/17/2024
7.0.15 55 02/05/2024
7.0.14 49 11/17/2023
7.0.13 56 10/24/2023
7.0.12 57 10/10/2023
7.0.11 61 09/14/2023
7.0.10 58 08/19/2023
7.0.9 60 07/25/2023
7.0.8 56 07/06/2023
7.0.7 52 06/20/2023
7.0.5 67 04/28/2023
7.0.4 56 05/18/2023
7.0.3 72 03/09/2023
7.0.2 63 01/26/2023
7.0.1 71 12/17/2022
7.0.0 520 11/15/2022
7.0.0-rc.2.22472.11 63 11/20/2022
7.0.0-rc.1.22426.7 62 06/27/2023
7.0.0-preview.7.22376.2 72 09/25/2022
7.0.0-preview.6.22329.4 60 11/20/2022
7.0.0-preview.5.22302.2 59 06/29/2023
7.0.0-preview.4.22229.2 58 06/28/2023
7.0.0-preview.3.22175.1 61 05/06/2022
7.0.0-preview.2.22153.1 67 05/28/2022
7.0.0-preview.1.22076.6 53 03/01/2022
6.0.36 41 11/13/2024
6.0.35 35 10/12/2024
6.0.33 46 08/15/2024
6.0.32 50 07/10/2024
6.0.31 41 05/29/2024
6.0.30 45 05/15/2024
6.0.29 46 04/11/2024
6.0.28 45 03/19/2024
6.0.27 44 02/17/2024
6.0.26 48 01/21/2024
6.0.25 54 11/17/2023
6.0.24 48 10/24/2023
6.0.23 56 10/10/2023
6.0.22 55 09/14/2023
6.0.21 49 08/23/2023
6.0.20 49 07/26/2023
6.0.19 60 07/11/2023
6.0.18 51 07/05/2023
6.0.16 62 04/28/2023
6.0.15 55 07/02/2023
6.0.14 64 06/05/2023
6.0.13 59 07/01/2023
6.0.12 58 06/29/2023
6.0.11 64 11/28/2022
6.0.10 69 10/14/2022
6.0.9 50 10/10/2022
6.0.8 59 08/30/2022
6.0.7 64 07/21/2022
6.0.6 78 07/12/2022
6.0.5 68 05/25/2022
6.0.4 61 12/22/2022
6.0.3 84 03/09/2022
6.0.2 75 02/11/2022
6.0.1 85 12/20/2021
6.0.0 73 11/09/2021
6.0.0-rc.2.21480.5 51 06/15/2023
6.0.0-rc.1.21452.10 53 05/16/2022
6.0.0-preview.7.21378.4 67 06/13/2022
6.0.0-preview.6.21352.1 55 05/10/2022
6.0.0-preview.5.21301.9 72 11/15/2022
6.0.0-preview.4.21253.1 65 05/18/2022
6.0.0-preview.3.21201.2 56 08/24/2022
6.0.0-preview.2.21154.2 56 05/10/2022
6.0.0-preview.1.21102.2 56 06/24/2023
5.0.17 52 06/29/2023
5.0.16 62 11/02/2022
5.0.15 70 05/11/2022
5.0.14 58 07/17/2022
5.0.13 54 06/30/2023
5.0.12 63 05/19/2022
5.0.11 61 10/22/2021
5.0.10 77 09/24/2021
5.0.9 73 07/02/2023
5.0.8 66 07/19/2021
5.0.7 89 07/09/2021
5.0.6 69 05/28/2022
5.0.5 59 04/18/2023
5.0.4 59 04/06/2021
5.0.3 230 02/15/2021
5.0.2 194 01/26/2021
5.0.1 62 07/03/2022
5.0.0 62 10/26/2022
5.0.0-rc.2.20475.6 54 06/20/2022
5.0.0-rc.1.20451.13 58 06/28/2023
5.0.0-preview.8.20407.4 60 05/27/2022
5.0.0-preview.7.20365.15 62 05/10/2022
5.0.0-preview.6.20312.4 60 06/28/2023
5.0.0-preview.5.20278.2 53 06/29/2023
5.0.0-preview.4.20220.10 59 06/06/2022
5.0.0-preview.3.20181.2 70 10/06/2022
5.0.0-preview.2.20159.4 58 06/30/2023
5.0.0-preview.2.20120.8 52 06/04/2022
3.1.32 46 07/01/2023
3.1.31 56 12/02/2022
3.1.30 57 06/29/2023
3.1.29 61 01/13/2023
3.1.28 58 05/15/2023
3.1.27 53 06/24/2023
3.1.26 60 09/14/2022
3.1.25 47 06/29/2023
3.1.24 56 12/25/2022
3.1.23 51 05/15/2023
3.1.22 49 06/14/2023
3.1.21 70 06/02/2022
3.1.20 52 06/23/2023
3.1.19 48 06/27/2023
3.1.18 46 06/30/2023
3.1.17 61 10/25/2022
3.1.16 54 05/20/2022
3.1.15 60 09/28/2022
3.1.14 58 12/24/2021
3.1.13 56 10/16/2022
3.1.12 57 06/19/2022
3.1.11 62 05/10/2022
3.1.10 53 02/04/2023
3.1.9 65 05/16/2022
3.1.8 64 05/19/2022
3.1.7 133 11/09/2020
3.1.6 73 11/02/2022
3.1.5 51 06/15/2023
3.1.4 60 06/24/2023
3.1.3 60 05/09/2022
3.1.2 57 06/03/2022
3.1.1 61 08/03/2022
3.1.0 58 05/15/2023
3.1.0-preview3.19554.8 61 06/23/2022
3.1.0-preview2.19525.5 65 11/29/2022
3.1.0-preview1.19506.2 58 06/28/2023
3.0.3 84 11/05/2022
3.0.2 57 06/22/2022
3.0.1 49 06/29/2023
3.0.0 59 05/11/2022
3.0.0-rc1.19456.14 59 07/03/2022
3.0.0-preview9.19423.6 61 06/27/2022
3.0.0-preview8.19405.11 51 06/28/2023
3.0.0-preview7.19362.6 63 06/27/2023
3.0.0-preview6.19304.10 52 07/16/2022
3.0.0-preview5.19227.1 69 05/16/2022
3.0.0-preview4.19216.3 62 06/28/2023
3.0.0-preview3.19153.1 64 06/27/2022
3.0.0-preview.19074.3 59 06/29/2023
3.0.0-preview.18572.1 56 05/10/2022
2.3.0 28 01/17/2025
2.2.6 60 11/22/2021
2.2.4 68 12/26/2022
2.2.3 73 06/04/2022
2.2.2 55 12/03/2022
2.2.1 82 06/17/2022
2.2.0 74 05/09/2022
2.2.0-preview3-35497 54 05/27/2022
2.2.0-preview2-35157 63 06/28/2023
2.2.0-preview1-35029 59 06/29/2023
2.1.14 49 06/29/2023
2.1.11 68 05/23/2022
2.1.8 48 06/28/2023
2.1.4 62 04/03/2023
2.1.3 52 05/10/2023
2.1.2 55 06/24/2023
2.1.1 62 02/22/2023
2.1.0 61 11/15/2022
2.1.0-rc1-final 48 05/10/2022
2.1.0-preview2-final 77 05/31/2022
2.1.0-preview1-final 54 05/16/2022
2.0.3 53 11/03/2022
2.0.2 60 06/29/2023
2.0.1 54 05/17/2022
2.0.0 59 05/20/2022
2.0.0-preview2-final 55 06/27/2023
2.0.0-preview1-final 62 05/10/2022
1.1.6 59 05/09/2022
1.1.5 58 02/21/2023
1.1.4 49 05/15/2023
1.1.3 73 05/22/2022
1.1.2 56 10/03/2022
1.1.1 65 11/11/2022
1.1.0 57 12/16/2022
1.1.0-preview1-final 59 12/21/2022
1.0.6 65 12/31/2022
1.0.5 56 05/30/2022
1.0.4 55 02/21/2023
1.0.3 67 10/17/2022
1.0.2 53 01/16/2023
1.0.1 61 11/28/2022
1.0.0 65 01/22/2023
1.0.0-rc2-final 51 05/14/2023