Microsoft.EntityFrameworkCore 10.0.0-preview.6.25358.103

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
AspNetCore.HealthChecks.UI
HealthChecks.UI Is a ASP.NET Core UI viewer of ASP.NET Core HealthChecks.For more information see https://github.com/Xabaril/AspNetCore.Diagnostics.HealthChecks
43
AspNetCore.HealthChecks.UI.Core
HealthChecks.UI.Core package containing builder and model definitions
42
AspNetCore.HealthChecks.UI
HealthChecks.UI Is a ASP.NET Core UI viewer of ASP.NET Core HealthChecks.For more information see https://github.com/Xabaril/AspNetCore.Diagnostics.HealthChecks
42
AspNetCore.HealthChecks.UI.Data
HealthChecks.UI.Data package containing data models and database context definition
41
AspNetCore.HealthChecks.UI
HealthChecks.UI Is a ASP.NET Core UI viewer of ASP.NET Core HealthChecks.For more information see https://github.com/Xabaril/AspNetCore.Diagnostics.HealthChecks
39
AspNetCore.HealthChecks.UI
HealthChecks.UI Is a ASP.NET Core UI viewer of ASP.NET Core HealthChecks.For more information see https://github.com/Xabaril/AspNetCore.Diagnostics.HealthChecks
38
AspNetCore.HealthChecks.UI
HealthChecks.UI Is a ASP.NET Core UI viewer of ASP.NET Core HealthChecks.For more information see https://github.com/Xabaril/AspNetCore.Diagnostics.HealthChecks
37
AspNetCore.HealthChecks.UI
HealthChecks.UI Is a ASP.NET Core UI viewer of ASP.NET Core HealthChecks.For more information see https://github.com/Xabaril/AspNetCore.Diagnostics.HealthChecks
36
AspNetCore.HealthChecks.UI
HealthChecks.UI Is a ASP.NET Core UI viewer of ASP.NET Core HealthChecks.For more information see https://github.com/Xabaril/AspNetCore.Diagnostics.HealthChecks
35

.NET 10.0

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