Microsoft.EntityFrameworkCore 10.0.0-preview.5.25277.114

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
HotChocolate.Data.EntityFramework
Contains extensions for seamless integration of Entity Framework Core into HotChocolate
4,149
Microsoft.EntityFrameworkCore.Proxies
Lazy loading proxies for Entity Framework Core.
3,908
Microsoft.EntityFrameworkCore.Relational
Shared Entity Framework Core components for relational database providers.
3,903
Microsoft.EntityFrameworkCore.Relational
Shared Entity Framework Core components for relational database providers.
574
HotChocolate.Data.EntityFramework
Contains extensions for seamless integration of Entity Framework Core into HotChocolate
504
Microsoft.EntityFrameworkCore.Proxies
Lazy loading proxies for Entity Framework Core.
502
Microsoft.EntityFrameworkCore.Relational
Shared Entity Framework Core components for relational database providers.
495
Microsoft.EntityFrameworkCore.Proxies
Lazy loading proxies for Entity Framework Core.
287
Microsoft.EntityFrameworkCore.Relational
Shared Entity Framework Core components for relational database providers.
285
Microsoft.EntityFrameworkCore.InMemory
In-memory database provider for Entity Framework Core (to be used for testing purposes).
94
Ardalis.Specification.EntityFrameworkCore
EF Core plugin package to Ardalis.Specification containing EF Core evaluator and abstract repository.
67
AspNetCore.HealthChecks.UI.Core
HealthChecks.UI.Core package containing builder and model definitions
65
Microsoft.EntityFrameworkCore.InMemory
In-memory database provider for Entity Framework Core (to be used for testing purposes).
63
Ardalis.Specification.EntityFrameworkCore
EF Core plugin package to Ardalis.Specification containing EF Core evaluator and abstract repository.
63
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
60
Microsoft.EntityFrameworkCore.Proxies
Lazy-loading proxies for EF Core.
60
Microsoft.EntityFrameworkCore.Relational
Shared Entity Framework Core components for relational database providers.
60
Microsoft.EntityFrameworkCore.Relational
Shared Entity Framework Core components for relational database providers.
59
Microsoft.EntityFrameworkCore.Proxies
Lazy loading proxies for Entity Framework Core.
58

.NET 10.0

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