# Entity Framework Core

## Entity Framework Core <a href="#entity-framework-core" id="entity-framework-core"></a>

Entity Framework Core is an **object-relational mapper**. ORMs provide a layer between the domain model you implement in code and the database. **EF Core is a data access API** that allows you to interact with the database using .NET POCOs (**P**lain **O**ld **C**LR **O**bjects) and strongly-typed LINQ.&#x20;

This allows you to spend less time translating requests to and from the database and writing SQL, giving you more time to focus on important business logic.

EF Core supports many database engines, see [Database Providers](https://learn.microsoft.com/en-us/ef/core/providers/) for details.

### With EF Core, you can:

* Load data as C# objects (entities).
* Add, modify, and delete data by calling methods on those entities.
* Map multiple database tables to a single C# entity.
* Handle concurrency issues that arise when multiple users simultaneously attempt to update the same record.
* Use strongly typed Language Integrated Query (System.Linq) syntax to query the database.
* Access multiple databases including SQL Server, SQLite, Azure Cosmos DB, PostgreSQL, MySQL, and more.
* Build your domain model from an existing database.
* Manage your database schema based on your domain model.
* Commit changes to complex, deep and/or wide object graphs of related entities with a single method call.

## EF Core version history

Entity Framework Core releases and support are aligned with .NET releases and support

<table><thead><tr><th>Release</th><th>Target framework</th><th>Supported until</th><th data-hidden>Links</th></tr></thead><tbody><tr><td><a href="https://www.nuget.org/packages/Microsoft.EntityFrameworkCore">EF Core 7.0</a></td><td>.NET 6</td><td>May 14, 2024</td><td><a href="https://learn.microsoft.com/en-us/ef/core/what-is-new/ef-core-7.0/whatsnew">What's new</a> / <a href="https://learn.microsoft.com/en-us/ef/core/what-is-new/ef-core-7.0/breaking-changes">Breaking changes</a></td></tr><tr><td><a href="https://www.nuget.org/packages/Microsoft.EntityFrameworkCore/6.0.11">EF Core 6.0</a></td><td>.NET 6</td><td>November 12, 2024 (LTS)</td><td><a href="https://learn.microsoft.com/en-us/ef/core/what-is-new/ef-core-6.0/whatsnew">What's new</a> / <a href="https://learn.microsoft.com/en-us/ef/core/what-is-new/ef-core-6.0/breaking-changes">Breaking changes</a></td></tr><tr><td><a href="https://www.nuget.org/packages/Microsoft.EntityFrameworkCore/5.0.17"><del>EF Core 5.0</del></a></td><td>.NET Standard 2.1</td><td>Expired May 10, 2022</td><td><a href="https://devblogs.microsoft.com/dotnet/announcing-the-release-of-ef-core-5-0/">Announcement</a> / <a href="https://learn.microsoft.com/en-us/ef/core/what-is-new/ef-core-5.0/breaking-changes">Breaking changes</a></td></tr><tr><td><a href="https://www.nuget.org/packages/Microsoft.EntityFrameworkCore/3.1.31">EF Core 3.1</a></td><td>.NET Standard 2.0</td><td>December 13, 2022 (LTS)</td><td><a href="https://devblogs.microsoft.com/dotnet/announcing-entity-framework-core-3-1-and-entity-framework-6-4/">Announcement</a></td></tr><tr><td><a href="https://www.nuget.org/packages/Microsoft.EntityFrameworkCore/3.0.3"><del>EF Core 3.0</del></a></td><td>.NET Standard 2.1</td><td>Expired March 3, 2020</td><td><a href="https://devblogs.microsoft.com/dotnet/announcing-ef-core-3-0-and-ef-6-3-general-availability/">Announcement</a> / <a href="https://learn.microsoft.com/en-us/ef/core/what-is-new/ef-core-3.x/breaking-changes">Breaking changes</a></td></tr><tr><td><a href="https://www.nuget.org/packages/Microsoft.EntityFrameworkCore/2.2.6"><del>EF Core 2.2</del></a></td><td>.NET Standard 2.0</td><td>Expired December 23, 2019</td><td><a href="https://devblogs.microsoft.com/dotnet/announcing-entity-framework-core-2-2/">Announcement</a></td></tr><tr><td><a href="https://www.nuget.org/packages/Microsoft.EntityFrameworkCore/2.1.14"><del>EF Core 2.1</del></a></td><td>.NET Standard 2.0</td><td>Expired August 21, 2021*</td><td><a href="https://devblogs.microsoft.com/dotnet/announcing-entity-framework-core-2-1/">Announcement</a></td></tr><tr><td><a href="https://www.nuget.org/packages/Microsoft.EntityFrameworkCore/2.0.3"><del>EF Core 2.0</del></a></td><td>.NET Standard 2.0</td><td>Expired October 1, 2018</td><td><a href="https://devblogs.microsoft.com/dotnet/announcing-entity-framework-core-2-0/">Announcement</a></td></tr><tr><td><a href="https://www.nuget.org/packages/Microsoft.EntityFrameworkCore/1.1.6"><del>EF Core 1.1</del></a></td><td>.NET Standard 1.3</td><td>Expired June 27, 2019</td><td><a href="https://devblogs.microsoft.com/dotnet/announcing-entity-framework-core-1-1/">Announcement</a></td></tr><tr><td><a href="https://www.nuget.org/packages/Microsoft.EntityFrameworkCore/1.0.6"><del>EF Core 1.0</del></a></td><td>.NET Standard 1.3</td><td>Expired June 27, 2019</td><td><a href="https://devblogs.microsoft.com/dotnet/entity-framework-core-1-0-0-available/">Announcement</a></td></tr></tbody></table>

### Guidance on updating to new releases <a href="#guidance-on-updating-to-new-releases" id="guidance-on-updating-to-new-releases"></a>

* Supported releases are patched for security and other critical bugs. Always use the latest patch of a given release. For example, for EF Core 2.1, use 2.1.x for the highest 'x' available.
* Major version updates (for example, from EF Core 2 to EF Core 3) often have breaking changes. Thorough testing is advised when updating across major versions. Use the breaking changes links above for guidance on dealing with breaking changes.
* Minor version updates do not typically contain breaking changes. However, thorough testing is still advised since new features can introduce regressions.
