Microsoft.EntityFrameworkCore 10.0.15

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.Relational
Shared Entity Framework Core components for relational database providers.
161
Microsoft.VisualStudio.Web.CodeGeneration.EntityFrameworkCore
Contains Entity Framework Core Services used by ASP.NET Core Code Generators.
160
Microsoft.EntityFrameworkCore.Relational
Shared Entity Framework Core components for relational database providers.
155
Microsoft.VisualStudio.Web.CodeGeneration.EntityFrameworkCore
Contains Entity Framework Core Services used by ASP.NET Core Code Generators.
154
Microsoft.EntityFrameworkCore.Relational
Shared Entity Framework Core components for relational database providers. This package was built from the source code at https://github.com/aspnet/EntityFrameworkCore/tree/8e7402701ea1416b7fe55e1863ae65b3147c02c7
154
Microsoft.EntityFrameworkCore.Relational
Shared Entity Framework Core components for relational database providers.
153
Microsoft.VisualStudio.Web.CodeGeneration.EntityFrameworkCore
Contains Entity Framework Core Services used by ASP.NET Core Code Generators.
153
Microsoft.EntityFrameworkCore.Relational
Shared Entity Framework Core components for relational database providers.
151
Microsoft.EntityFrameworkCore.Relational
Shared Entity Framework Core components for relational database providers. This package was built from the source code at https://github.com/aspnet/EntityFrameworkCore/tree/d1b10fc6ccca83e29109a0a8d9c047f2e68aede5
150
Microsoft.EntityFrameworkCore.Relational
Shared Entity Framework Core components for relational database providers.
150
Microsoft.VisualStudio.Web.CodeGeneration.EntityFrameworkCore
Contains Entity Framework Core Services used by ASP.NET Core Code Generators.
150
Microsoft.EntityFrameworkCore.Relational
Shared Entity Framework Core components for relational database providers.
149
Microsoft.VisualStudio.Web.CodeGeneration.EntityFrameworkCore
Contains Entity Framework Core Services used by ASP.NET Core Code Generators.
148
Microsoft.VisualStudio.Web.CodeGeneration.EntityFrameworkCore
Contains Entity Framework Core Services used by ASP.NET Core Code Generators.
147
Microsoft.EntityFrameworkCore.Relational
Shared Entity Framework Core components for relational database providers.
146

Version Downloads Last updated
11.0.0 16 11/10/2026
11.0.0-rc.3.26522.148 13 10/27/2026
11.0.0-rc.2.26504.105 17 10/14/2026
11.0.0-rc.1.26425.128 30 9/9/2026
11.0.0-preview.7.26381.103 25 8/13/2026
11.0.0-preview.6.26359.118 36 7/16/2026
11.0.0-preview.5.26302.115 35 6/10/2026
11.0.0-preview.4.26230.115 48 5/12/2026
11.0.0-preview.3.26207.106 42 5/3/2026
11.0.0-preview.2.26159.112 40 3/12/2026
11.0.0-preview.1.26104.118 45 2/12/2026
10.0.15 16 11/11/2026
10.0.14 15 10/27/2026
10.0.13 17 10/14/2026
10.0.12 22 9/9/2026
10.0.11 27 8/13/2026
10.0.10 32 7/16/2026
10.0.9 41 6/10/2026
10.0.8 38 5/13/2026
10.0.7 51 5/3/2026
10.0.6 47 5/3/2026
10.0.5 46 3/14/2026
10.0.4 39 3/12/2026
10.0.3 42 2/12/2026
10.0.2 47 1/15/2026
10.0.1 53 12/10/2025
10.0.0 71 11/12/2025
10.0.0-rc.2.25502.107 77 10/15/2025
10.0.0-rc.1.25451.107 95 9/10/2025
10.0.0-preview.7.25380.108 97 8/12/2025
10.0.0-preview.6.25358.103 96 7/15/2025
10.0.0-preview.5.25277.114 95 6/8/2025
10.0.0-preview.4.25258.110 113 5/16/2025
10.0.0-preview.3.25171.6 111 4/12/2025
10.0.0-preview.2.25163.8 113 3/18/2025
10.0.0-preview.1.25081.1 103 2/28/2025
9.0.23 14 11/12/2026
9.0.22 17 10/27/2026
9.0.21 16 10/14/2026
9.0.20 22 9/10/2026
9.0.19 29 8/13/2026
9.0.18 29 7/16/2026
9.0.17 42 6/10/2026
9.0.16 48 5/13/2026
9.0.15 48 5/3/2026
9.0.14 40 3/12/2026
9.0.13 48 2/12/2026
9.0.12 47 1/15/2026
9.0.11 73 11/12/2025
9.0.10 82 10/15/2025
9.0.9 105 9/10/2025
9.0.8 94 8/5/2025
9.0.7 117 7/11/2025
9.0.6 107 6/15/2025
9.0.5 104 5/17/2025
9.0.4 110 4/8/2025
9.0.3 118 3/13/2025
9.0.2 131 2/15/2025
9.0.1 139 1/18/2025
9.0.0 133 11/12/2024
9.0.0-rc.2.24474.1 127 10/11/2024
9.0.0-rc.1.24451.1 110 9/11/2024
9.0.0-preview.7.24405.3 131 8/14/2024
9.0.0-preview.6.24327.4 121 7/10/2024
9.0.0-preview.5.24306.3 140 6/14/2024
9.0.0-preview.4.24267.1 127 5/25/2024
9.0.0-preview.3.24172.4 123 4/14/2024
9.0.0-preview.2.24128.4 129 3/21/2024
9.0.0-preview.1.24081.2 139 2/21/2024
8.0.34 16 11/11/2026
8.0.33 13 10/27/2026
8.0.32 18 10/14/2026
8.0.31 21 9/10/2026
8.0.30 31 8/13/2026
8.0.29 30 7/16/2026
8.0.28 43 6/10/2026
8.0.27 43 5/13/2026
8.0.26 53 5/3/2026
8.0.25 43 3/12/2026
8.0.24 45 2/12/2026
8.0.23 49 1/15/2026
8.0.22 71 11/12/2025
8.0.21 85 10/15/2025
8.0.20 86 9/10/2025
8.0.19 81 8/6/2025
8.0.18 103 7/11/2025
8.0.17 96 6/15/2025
8.0.16 108 5/17/2025
8.0.15 108 4/9/2025
8.0.14 108 3/13/2025
8.0.13 99 2/20/2025
8.0.12 113 1/18/2025
8.0.11 117 11/13/2024
8.0.10 125 10/12/2024
8.0.8 112 8/13/2024
8.0.7 134 7/9/2024
8.0.6 132 5/29/2024
8.0.5 116 5/23/2024
8.0.4 118 4/10/2024
8.0.3 145 3/20/2024
8.0.2 126 2/22/2024
8.0.1 131 1/11/2024
8.0.0 131 11/15/2023
8.0.0-rc.2.23480.1 143 10/13/2023
8.0.0-rc.1.23419.6 154 9/15/2023
8.0.0-preview.7.23375.4 149 8/22/2023
8.0.0-preview.6.23329.4 139 7/31/2023
8.0.0-preview.5.23280.1 137 7/31/2023
8.0.0-preview.4.23259.3 145 5/20/2023
8.0.0-preview.3.23174.2 134 5/14/2023
8.0.0-preview.2.23128.3 155 7/31/2023
8.0.0-preview.1.23111.4 170 2/23/2023
7.0.20 126 5/29/2024
7.0.19 115 5/23/2024
7.0.18 136 4/10/2024
7.0.17 128 3/20/2024
7.0.16 127 2/22/2024
7.0.15 118 1/15/2024
7.0.14 136 11/15/2023
7.0.13 135 10/28/2023
7.0.12 141 10/10/2023
7.0.11 128 9/16/2023
7.0.10 138 8/20/2023
7.0.9 153 7/31/2023
7.0.8 133 7/31/2023
7.0.7 143 7/31/2023
7.0.5 144 5/12/2023
7.0.4 138 5/12/2023
7.0.3 133 2/21/2023
7.0.2 131 2/21/2023
7.0.1 159 2/14/2023
7.0.0 136 12/3/2022
7.0.0-rc.2.22472.11 144 11/9/2022
7.0.0-rc.1.22426.7 146 9/15/2022
7.0.0-preview.7.22376.2 122 9/11/2022
7.0.0-preview.6.22329.4 147 9/14/2022
7.0.0-preview.5.22302.2 162 6/27/2022
7.0.0-preview.4.22229.2 146 6/30/2022
7.0.0-preview.3.22175.1 151 6/30/2022
7.0.0-preview.2.22153.1 148 6/30/2022
7.0.0-preview.1.22076.6 143 6/30/2022
6.0.36 121 11/13/2024
6.0.35 124 10/11/2024
6.0.33 123 8/14/2024
6.0.32 137 7/9/2024
6.0.31 136 5/29/2024
6.0.30 143 5/19/2024
6.0.29 128 4/10/2024
6.0.28 145 3/20/2024
6.0.27 132 2/22/2024
6.0.26 118 1/15/2024
6.0.25 132 11/16/2023
6.0.24 128 10/28/2023
6.0.23 136 10/10/2023
6.0.22 135 9/17/2023
6.0.21 142 8/22/2023
6.0.20 133 7/31/2023
6.0.19 166 7/31/2023
6.0.18 141 7/31/2023
6.0.16 141 5/12/2023
6.0.15 142 3/16/2023
6.0.14 130 2/21/2023
6.0.13 155 2/9/2023
6.0.12 151 12/30/2022
6.0.11 148 12/3/2022
6.0.10 141 12/3/2022
6.0.9 144 9/14/2022
6.0.8 141 9/14/2022
6.0.7 180 7/26/2022
6.0.6 145 6/30/2022
6.0.5 144 6/30/2022
6.0.4 138 6/30/2022
6.0.3 136 6/30/2022
6.0.2 147 6/30/2022
6.0.1 127 6/30/2022
6.0.0 161 6/30/2022
6.0.0-rc.2.21480.5 144 6/30/2022
6.0.0-rc.1.21452.10 144 6/30/2022
6.0.0-preview.7.21378.4 160 6/30/2022
6.0.0-preview.6.21352.1 145 6/30/2022
6.0.0-preview.5.21301.9 176 6/30/2022
6.0.0-preview.4.21253.1 144 6/30/2022
6.0.0-preview.3.21201.2 136 6/30/2022
6.0.0-preview.2.21154.2 150 6/30/2022
6.0.0-preview.1.21102.2 151 6/30/2022
5.0.17 146 6/30/2022
5.0.16 144 6/30/2022
5.0.15 168 6/30/2022
5.0.14 152 6/30/2022
5.0.13 145 6/30/2022
5.0.12 140 6/30/2022
5.0.11 141 6/30/2022
5.0.10 165 6/30/2022
5.0.9 160 6/30/2022
5.0.8 129 6/30/2022
5.0.7 155 6/30/2022
5.0.6 132 6/30/2022
5.0.5 142 6/30/2022
5.0.4 140 6/30/2022
5.0.3 135 6/30/2022
5.0.2 138 6/30/2022
5.0.1 148 6/30/2022
5.0.0 136 6/30/2022
5.0.0-rc.2.20475.6 126 6/30/2022
5.0.0-rc.1.20451.13 153 6/30/2022
5.0.0-preview.8.20407.4 148 6/30/2022
5.0.0-preview.7.20365.15 136 6/30/2022
5.0.0-preview.6.20312.4 170 6/30/2022
5.0.0-preview.5.20278.2 135 6/30/2022
5.0.0-preview.4.20220.10 131 6/30/2022
5.0.0-preview.3.20181.2 137 6/30/2022
5.0.0-preview.2.20159.4 133 6/30/2022
5.0.0-preview.2.20120.8 143 6/30/2022
3.1.32 151 2/1/2023
3.1.31 133 12/3/2022
3.1.30 148 11/7/2022
3.1.29 145 9/14/2022
3.1.28 141 9/14/2022
3.1.27 133 9/14/2022
3.1.26 135 6/30/2022
3.1.25 131 6/30/2022
3.1.24 140 6/30/2022
3.1.23 143 6/30/2022
3.1.22 138 6/30/2022
3.1.21 139 6/30/2022
3.1.20 135 6/30/2022
3.1.19 137 6/30/2022
3.1.18 133 6/30/2022
3.1.17 152 6/30/2022
3.1.16 130 6/30/2022
3.1.15 129 6/30/2022
3.1.14 147 6/30/2022
3.1.13 157 6/30/2022
3.1.12 138 6/30/2022
3.1.11 141 6/30/2022
3.1.10 130 6/30/2022
3.1.9 136 6/30/2022
3.1.8 139 6/30/2022
3.1.7 136 6/30/2022
3.1.6 147 6/30/2022
3.1.5 128 6/30/2022
3.1.4 139 6/30/2022
3.1.3 135 6/30/2022
3.1.2 138 6/30/2022
3.1.1 140 6/30/2022
3.1.0 152 6/30/2022
3.1.0-preview3.19554.8 132 6/30/2022
3.1.0-preview2.19525.5 152 6/30/2022
3.1.0-preview1.19506.2 129 6/30/2022
3.0.3 138 6/30/2022
3.0.2 153 6/30/2022
3.0.1 154 6/30/2022
3.0.0 151 6/30/2022
3.0.0-rc1.19456.14 173 6/30/2022
3.0.0-preview9.19423.6 145 6/30/2022
3.0.0-preview8.19405.11 132 6/30/2022
3.0.0-preview7.19362.6 158 6/30/2022
3.0.0-preview6.19304.10 157 6/30/2022
3.0.0-preview5.19227.1 129 6/30/2022
3.0.0-preview4.19216.3 142 6/30/2022
3.0.0-preview3.19153.1 150 6/30/2022
3.0.0-preview.19074.3 145 6/30/2022
3.0.0-preview.18572.1 150 6/30/2022
2.3.0 126 1/21/2025
2.2.6 133 6/30/2022
2.2.4 135 6/30/2022
2.2.3 151 6/30/2022
2.2.2 132 6/30/2022
2.2.1 156 6/30/2022
2.2.0 133 6/30/2022
2.2.0-preview3-35497 152 6/30/2022
2.2.0-preview2-35157 155 6/30/2022
2.2.0-preview1-35029 169 6/30/2022
2.1.14 133 6/30/2022
2.1.11 163 6/30/2022
2.1.8 160 6/30/2022
2.1.4 133 6/30/2022
2.1.3 129 6/30/2022
2.1.2 170 6/30/2022
2.1.1 132 6/30/2022
2.1.0 155 6/30/2022
2.1.0-rc1-final 142 6/30/2022
2.1.0-preview2-final 141 6/30/2022
2.1.0-preview1-final 147 6/30/2022
2.0.3 133 6/30/2022
2.0.2 136 6/30/2022
2.0.1 143 6/30/2022
2.0.0 137 6/30/2022
2.0.0-preview2-final 134 6/30/2022
2.0.0-preview1-final 160 6/30/2022
1.1.6 140 6/30/2022
1.1.5 159 6/30/2022
1.1.4 147 6/30/2022
1.1.3 146 6/30/2022
1.1.2 161 6/30/2022
1.1.1 169 6/30/2022
1.1.0 145 6/30/2022
1.1.0-preview1-final 133 6/30/2022
1.0.6 165 6/30/2022
1.0.5 134 6/30/2022
1.0.4 125 6/30/2022
1.0.3 135 6/30/2022
1.0.2 143 6/30/2022
1.0.1 140 6/30/2022
1.0.0 158 6/30/2022
1.0.0-rc2-final 133 6/30/2022