Microsoft.EntityFrameworkCore 10.0.0-preview.2.25163.8

Prefix Reserved
This is a prerelease version of Microsoft.EntityFrameworkCore.
There is a newer prerelease version of this package available.
See the version list below for details.

Requires NuGet 3.6 or higher.

dotnet add package Microsoft.EntityFrameworkCore --version 10.0.0-preview.2.25163.8
                    
NuGet\Install-Package Microsoft.EntityFrameworkCore -Version 10.0.0-preview.2.25163.8
                    
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.0-preview.2.25163.8" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="10.0.0-preview.2.25163.8" />
                    
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.0-preview.2.25163.8
                    
#r "nuget: Microsoft.EntityFrameworkCore, 10.0.0-preview.2.25163.8"
                    
#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.
#addin nuget:?package=Microsoft.EntityFrameworkCore&version=10.0.0-preview.2.25163.8&prerelease
                    
Install Microsoft.EntityFrameworkCore as a Cake Addin
#tool nuget:?package=Microsoft.EntityFrameworkCore&version=10.0.0-preview.2.25163.8&prerelease
                    
Install Microsoft.EntityFrameworkCore 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (8.8K)

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.EntityFrameworkCore.Proxies

Lazy loading proxies for Entity Framework Core.

Microsoft.AspNetCore.App

Provides a default set of APIs for building an ASP.NET Core application. This package requires the ASP.NET Core runtime. This runtime is installed by the .NET Core SDK, or can be acquired separately using installers available at https://aka.ms/dotnet-download.

GitHub repositories (625)

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

Repository Stars
jasontaylordev/CleanArchitecture
Clean Architecture Solution Template for ASP.NET Core
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.
dotnet/AspNetCore.Docs
Documentation for ASP.NET Core
aspnetboilerplate/aspnetboilerplate
ASP.NET Boilerplate - Web Application Framework
kgrzybek/modular-monolith-with-ddd
Full Modular Monolith application with Domain-Driven Design approach.
dodyg/practical-aspnetcore
Practical samples of ASP.NET Core 10 Preview 3, 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
elsa-workflows/elsa-core
A .NET workflows library
louthy/language-ext
C# pure functional programming framework - come and get declarative!
btcpayserver/btcpayserver
Accept Bitcoin payments. Free, open-source & self-hosted, Bitcoin payment processor.
EduardoPires/EquinoxProject
Web Application ASP.NET 8 using Clean Architecture, DDD, CQRS, Event Sourcing and a lot of good practices
graphql-dotnet/graphql-dotnet
GraphQL for .NET
ldqk/Masuit.Tools
全龄段友好的C#万能工具库,码数吐司库,包含一些常用的操作类,大都是静态类,加密解密,反射操作,权重随机筛选算法,分布式短id,表达式树,linq扩展,文件压缩,多线程下载,硬件信息,字符串扩展方法,日期时间扩展操作,中国农历,大文件拷贝,图像裁剪,验证码,断点续传,集合扩展、Excel导出等常用封装。诸多功能集一身,代码量不到2MB!
fullstackhero/dotnet-starter-kit
Production Grade Cloud-Ready .NET 9 Starter Kit (Web API + Blazor Client) with Multitenancy Support, and Clean/Modular Architecture that saves roughly 200+ Development Hours! All Batteries Included.
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.
dotnetcore/Util
Util是一个.Net平台下的应用框架,旨在提升中小团队的开发能力,由工具类、分层架构基类、Ui组件,配套代码生成模板,权限等组成。
MapsterMapper/Mapster
A fast, fun and stimulating object to object Mapper
Version Downloads Last updated
10.0.0-preview.3.25171.6 1,287 3 days ago
10.0.0-preview.2.25163.8 10,270 a month ago
10.0.0-preview.1.25081.1 11,489 2 months ago
9.0.4 211,854 5 days ago
9.0.3 3,327,415 a month ago
9.0.2 3,708,246 2 months ago
9.0.1 5,533,667 3 months ago
9.0.0 10,704,156 5 months ago
9.0.0-rc.2.24474.1 192,157 6 months ago
9.0.0-rc.1.24451.1 123,846 7 months ago
9.0.0-preview.7.24405.3 80,337 8 months ago
9.0.0-preview.6.24327.4 118,577 9 months ago
9.0.0-preview.5.24306.3 43,908 6/11/2024
9.0.0-preview.4.24267.1 58,287 5/21/2024
9.0.0-preview.3.24172.4 171,511 4/11/2024
9.0.0-preview.2.24128.4 67,028 3/12/2024
9.0.0-preview.1.24081.2 103,942 2/13/2024
8.0.15 70,265 5 days ago
8.0.14 1,085,770 a month ago
8.0.13 2,039,517 2 months ago
8.0.12 2,645,563 3 months ago
8.0.11 11,862,296 5 months ago
8.0.10 16,836,720 6 months ago
8.0.8 21,811,999 8 months ago
8.0.7 13,906,984 9 months ago
8.0.6 16,081,745 5/28/2024
8.0.5 6,955,668 5/14/2024
8.0.4 25,566,532 4/9/2024
8.0.3 10,797,653 3/12/2024
8.0.2 20,952,601 2/13/2024
8.0.1 13,751,957 1/9/2024
8.0.0 39,969,221 11/14/2023
8.0.0-rc.2.23480.1 515,940 10/10/2023
8.0.0-rc.1.23419.6 143,923 9/12/2023
8.0.0-preview.7.23375.4 113,833 8/8/2023
8.0.0-preview.6.23329.4 195,235 7/11/2023
8.0.0-preview.5.23280.1 175,877 6/13/2023
8.0.0-preview.4.23259.3 134,879 5/16/2023
8.0.0-preview.3.23174.2 225,277 4/11/2023
8.0.0-preview.2.23128.3 195,007 3/14/2023
8.0.0-preview.1.23111.4 138,621 2/21/2023
7.0.20 3,080,809 5/28/2024
7.0.19 497,369 5/14/2024
7.0.18 2,162,557 4/9/2024
7.0.17 1,575,883 3/12/2024
7.0.16 2,009,778 2/13/2024
7.0.15 3,138,512 1/9/2024
7.0.14 5,941,667 11/14/2023
7.0.13 6,575,353 10/24/2023
7.0.12 4,350,510 10/10/2023
7.0.11 13,297,097 9/12/2023
7.0.10 9,524,232 8/8/2023
7.0.9 8,872,248 7/11/2023
7.0.8 5,420,960 6/22/2023
7.0.7 3,730,099 6/13/2023
7.0.5 25,255,520 4/11/2023
7.0.4 9,323,744 3/14/2023
7.0.3 13,628,455 2/14/2023
7.0.2 18,484,025 1/10/2023
7.0.1 9,916,797 12/13/2022
7.0.0 29,349,521 11/7/2022
7.0.0-rc.2.22472.11 218,960 10/11/2022
7.0.0-rc.1.22426.7 213,759 9/14/2022
7.0.0-preview.7.22376.2 97,799 8/9/2022
7.0.0-preview.6.22329.4 76,467 7/12/2022
7.0.0-preview.5.22302.2 64,760 6/14/2022
7.0.0-preview.4.22229.2 84,031 5/10/2022
7.0.0-preview.3.22175.1 78,417 4/13/2022
7.0.0-preview.2.22153.1 86,065 3/14/2022
7.0.0-preview.1.22076.6 58,248 2/17/2022
6.0.36 913,106 5 months ago
6.0.35 574,860 6 months ago
6.0.33 1,562,926 8 months ago
6.0.32 728,314 9 months ago
6.0.31 1,010,116 5/28/2024
6.0.30 533,613 5/14/2024
6.0.29 2,545,875 4/9/2024
6.0.28 1,491,374 3/12/2024
6.0.27 1,790,948 2/13/2024
6.0.26 2,559,944 1/9/2024
6.0.25 3,535,070 11/14/2023
6.0.24 1,840,656 10/24/2023
6.0.23 1,216,071 10/10/2023
6.0.22 3,306,524 9/12/2023
6.0.21 3,506,371 8/8/2023
6.0.20 2,815,349 7/11/2023
6.0.19 2,364,724 6/22/2023
6.0.18 1,258,841 6/13/2023
6.0.16 7,440,465 4/11/2023
6.0.15 4,116,613 3/14/2023
6.0.14 5,215,301 2/14/2023
6.0.13 6,847,294 1/10/2023
6.0.12 10,674,873 12/13/2022
6.0.11 9,791,403 11/7/2022
6.0.10 17,297,742 10/11/2022
6.0.9 15,126,202 9/13/2022
6.0.8 18,187,997 8/9/2022
6.0.7 49,126,267 7/12/2022
6.0.6 14,597,048 6/14/2022
6.0.5 22,268,790 5/10/2022
6.0.4 17,753,653 4/11/2022
6.0.3 24,350,065 3/8/2022
6.0.2 19,600,759 2/8/2022
6.0.1 32,457,345 12/14/2021
6.0.0 67,543,446 11/8/2021
6.0.0-rc.2.21480.5 324,175 10/12/2021
6.0.0-rc.1.21452.10 265,701 9/14/2021
6.0.0-preview.7.21378.4 97,091 8/10/2021
6.0.0-preview.6.21352.1 43,704 7/14/2021
6.0.0-preview.5.21301.9 187,068 6/15/2021
6.0.0-preview.4.21253.1 72,776 5/24/2021
6.0.0-preview.3.21201.2 96,899 4/8/2021
6.0.0-preview.2.21154.2 73,045 3/11/2021
6.0.0-preview.1.21102.2 95,972 2/12/2021
5.0.17 7,619,515 5/10/2022 5.0.17 is deprecated because it is no longer maintained.
5.0.16 1,492,566 4/11/2022 5.0.16 is deprecated because it is no longer maintained.
5.0.15 2,332,331 3/8/2022 5.0.15 is deprecated because it is no longer maintained.
5.0.14 2,353,462 2/8/2022 5.0.14 is deprecated because it is no longer maintained.
5.0.13 4,442,195 12/14/2021 5.0.13 is deprecated because it is no longer maintained.
5.0.12 4,826,668 11/7/2021 5.0.12 is deprecated because it is no longer maintained.
5.0.11 8,389,364 10/12/2021 5.0.11 is deprecated because it is no longer maintained.
5.0.10 13,387,069 9/14/2021 5.0.10 is deprecated because it is no longer maintained.
5.0.9 10,291,035 8/10/2021 5.0.9 is deprecated because it is no longer maintained.
5.0.8 9,587,583 7/13/2021 5.0.8 is deprecated because it is no longer maintained.
5.0.7 14,377,029 6/8/2021 5.0.7 is deprecated because it is no longer maintained.
5.0.6 8,185,359 5/11/2021 5.0.6 is deprecated because it is no longer maintained.
5.0.5 11,410,355 4/6/2021 5.0.5 is deprecated because it is no longer maintained.
5.0.4 8,275,671 3/9/2021 5.0.4 is deprecated because it is no longer maintained.
5.0.3 8,070,315 2/9/2021 5.0.3 is deprecated because it is no longer maintained.
5.0.2 10,517,794 1/12/2021 5.0.2 is deprecated because it is no longer maintained.
5.0.1 15,917,950 12/8/2020 5.0.1 is deprecated because it is no longer maintained.
5.0.0 26,621,469 11/9/2020 5.0.0 is deprecated because it is no longer maintained.
5.0.0-rc.2.20475.6 380,261 10/13/2020
5.0.0-rc.1.20451.13 318,830 9/14/2020
5.0.0-preview.8.20407.4 202,814 8/25/2020
5.0.0-preview.7.20365.15 114,710 7/21/2020
5.0.0-preview.6.20312.4 63,927 6/25/2020
5.0.0-preview.5.20278.2 49,406 6/10/2020
5.0.0-preview.4.20220.10 73,809 5/18/2020
5.0.0-preview.3.20181.2 94,647 4/23/2020
5.0.0-preview.2.20159.4 61,654 4/2/2020
5.0.0-preview.2.20120.8 46,102 3/16/2020
3.1.32 5,614,892 12/13/2022
3.1.31 1,093,242 11/8/2022
3.1.30 739,595 10/11/2022
3.1.29 1,277,174 9/13/2022
3.1.28 846,325 8/9/2022
3.1.27 747,714 7/12/2022
3.1.26 652,509 6/14/2022
3.1.25 1,090,197 5/10/2022
3.1.24 656,874 4/11/2022
3.1.23 1,069,270 3/8/2022
3.1.22 3,436,065 12/14/2021
3.1.21 2,636,327 11/7/2021
3.1.20 1,572,469 10/11/2021
3.1.19 2,476,726 9/14/2021
3.1.18 5,302,388 8/10/2021
3.1.17 1,896,295 7/13/2021
3.1.16 2,389,838 6/8/2021
3.1.15 2,849,403 5/11/2021
3.1.14 3,122,211 4/6/2021
3.1.13 4,618,849 3/9/2021
3.1.12 3,015,581 2/9/2021
3.1.11 5,466,981 1/12/2021
3.1.10 8,362,123 11/9/2020
3.1.9 12,062,066 10/13/2020
3.1.8 17,741,936 9/8/2020
3.1.7 10,098,944 8/11/2020
3.1.6 10,815,861 7/14/2020
3.1.5 12,872,625 6/9/2020
3.1.4 17,978,258 5/12/2020
3.1.3 28,042,971 3/24/2020
3.1.2 11,946,704 2/19/2020
3.1.1 20,050,277 1/14/2020
3.1.0 34,330,656 12/3/2019
3.1.0-preview3.19554.8 164,763 11/13/2019
3.1.0-preview2.19525.5 32,746 11/1/2019
3.1.0-preview1.19506.2 761,199 10/15/2019
3.0.3 189,609 2/19/2020
3.0.2 80,184 1/14/2020
3.0.1 1,405,569 11/18/2019
3.0.0 19,073,530 9/23/2019
3.0.0-rc1.19456.14 46,710 9/16/2019
3.0.0-preview9.19423.6 1,381,008 9/4/2019
3.0.0-preview8.19405.11 412,661 8/13/2019
3.0.0-preview7.19362.6 90,579 7/23/2019
3.0.0-preview6.19304.10 168,071 6/12/2019
3.0.0-preview5.19227.1 671,687 5/6/2019
3.0.0-preview4.19216.3 22,995 4/18/2019
3.0.0-preview3.19153.1 202,325 3/6/2019
3.0.0-preview.19074.3 31,623 1/29/2019
3.0.0-preview.18572.1 48,573 12/3/2018
2.3.0 9,915 3 months ago
2.2.6 31,757,762 7/9/2019 2.2.6 is deprecated because it is no longer maintained.
2.2.4 19,548,233 4/9/2019 2.2.4 is deprecated because it is no longer maintained.
2.2.3 5,338,967 3/11/2019 2.2.3 is deprecated because it is no longer maintained.
2.2.2 6,435,894 2/12/2019 2.2.2 is deprecated because it is no longer maintained.
2.2.1 6,892,699 1/8/2019 2.2.1 is deprecated because it is no longer maintained.
2.2.0 21,709,475 12/3/2018 2.2.0 is deprecated because it is no longer maintained.
2.2.0-preview3-35497 184,857 10/17/2018
2.2.0-preview2-35157 149,023 9/12/2018
2.2.0-preview1-35029 82,176 8/22/2018
2.1.14 3,969,052 11/18/2019
2.1.11 3,699,136 5/14/2019
2.1.8 3,759,712 2/12/2019
2.1.4 15,553,195 10/1/2018
2.1.3 4,891,888 9/11/2018
2.1.2 8,106,274 8/21/2018
2.1.1 16,365,737 6/18/2018
2.1.0 13,269,501 5/29/2018
2.1.0-rc1-final 224,279 5/6/2018
2.1.0-preview2-final 205,346 4/10/2018
2.1.0-preview1-final 316,673 2/26/2018
2.0.3 5,341,813 5/7/2018 2.0.3 is deprecated because it is no longer maintained.
2.0.2 6,673,490 3/13/2018 2.0.2 is deprecated because it is no longer maintained.
2.0.1 12,512,959 11/14/2017 2.0.1 is deprecated because it is no longer maintained.
2.0.0 27,273,370 8/11/2017 2.0.0 is deprecated because it is no longer maintained.
2.0.0-preview2-final 96,108 6/28/2017 2.0.0-preview2-final is deprecated because it is no longer maintained.
2.0.0-preview1-final 1,117,819 5/10/2017 2.0.0-preview1-final is deprecated because it is no longer maintained.
1.1.6 5,857,498 7/10/2018 1.1.6 is deprecated because it is no longer maintained.
1.1.5 1,247,420 12/12/2017 1.1.5 is deprecated because it is no longer maintained.
1.1.4 224,076 11/14/2017 1.1.4 is deprecated because it is no longer maintained.
1.1.3 308,170 9/20/2017 1.1.3 is deprecated because it is no longer maintained.
1.1.2 5,008,631 5/9/2017 1.1.2 is deprecated because it is no longer maintained.
1.1.1 3,183,793 3/6/2017 1.1.1 is deprecated because it is no longer maintained.
1.1.0 7,289,350 11/16/2016 1.1.0 is deprecated because it is no longer maintained.
1.1.0-preview1-final 46,533 10/24/2016 1.1.0-preview1-final is deprecated because it is no longer maintained.
1.0.6 54,770 11/14/2017 1.0.6 is deprecated because it is no longer maintained.
1.0.5 43,159 9/20/2017 1.0.5 is deprecated because it is no longer maintained.
1.0.4 57,818 5/9/2017 1.0.4 is deprecated because it is no longer maintained.
1.0.3 651,224 3/6/2017 1.0.3 is deprecated because it is no longer maintained.
1.0.2 78,351 12/12/2016 1.0.2 is deprecated because it is no longer maintained.
1.0.1 791,156 9/13/2016 1.0.1 is deprecated because it is no longer maintained.
1.0.0 1,754,286 6/27/2016 1.0.0 is deprecated because it is no longer maintained.
1.0.0-rc2-final 140,425 5/16/2016 1.0.0-rc2-final is deprecated because it is no longer maintained.