Efcore Versions Save

EF Core is a modern object-database mapper for .NET. It supports LINQ queries, change tracking, updates, and schema migrations.

v9.0.0-preview.3.24172.4

2 weeks ago

The team has been working primarily on EF Core internals, so there are no new big features in EF Core 9 (EF9) Preview 3. However, this means we really need people like you to run your code on these new internals and report back what you find. We want to fix bugs in the new internals as soon as possible in order to have a strong GA release later in the year.

That being said, there are several smaller enhancements included in preview 3. For full details, see What's new in EF Core 9. To discuss the EF9 release, go to Try EF Core 9 now! on GitHub.

Auto-compiled models

Auto-compiled models allow the EF Core compiled model to be automatically regenerated when the model project is built. This means you no longer need to remember to re-run the dotnet ef dbcontext optimize command after your EF model changes. See Auto-compiled models in the What's New docs for more information.

Sugar for HierarchyId path generation

First class support for the SQL Server HierarchyId type was added in EF8. In EF9, a sugar method has been added to make it easier to create new child nodes in the tree structure. See Sugar for HierarchyId path generation in the What's New docs for more information.

Everything else in preview 3

Preview 3 contains:

EF Core 9 preview 3 (and Microsoft.Data.Sqlite) contains work from the EF Team at Microsoft (@roji @AndriySvyryd @maumar @ajcvickers @cincuranet @SamMonoRT @luisquintanilla) as well as contributions from the EF Core community. The community PRs in EF9 Preview 3 are:

v7.0.18

2 weeks ago

This is a patch release of EF Core 7.0 containing only updates to dependencies. There are no additional fixes in this release beyond those already shipped in EF Core 7.0.17.

v6.0.29

2 weeks ago

This is a patch release of EF Core 6.0 containing only updates to dependencies. There are no additional fixes in this release beyond those already shipped in EF Core 6.1.28.

v9.0.0-preview.2.24128.4

1 month ago

The team has been working primarily on EF Core internals, so there are no new big features in EF Core 9 (EF9) Preview 2. However, this means we really need people like you to run your code on these new internals and report back what you find. We want to fix bugs in the new internals as soon as possible in order to have a strong GA release later in the year.

That being said, there are several smaller enhancements included in preview 2, many contributed by our community. For full details, see What's new in EF Core 9. To discuss the EF9 release, go to Try EF Core 9 now! on GitHub.

Improved queries

  • Inlined uncorrelated subqueries
    • In EF8, an IQueryable referenced in another query may be executed as a separate database roundtrip.
    • See Inlined uncorrelated subqueries for full details.
  • New ToHashSetAsync methods
    • The ToHashSet methods have existed since .NET Core 2.0. In EF9, the equivalent async methods have been added.
    • See New ToHashSetAsync<T> methods for full details.

Improved model building

  • Specify caching for sequences
    • EF9 allows setting the caching options for database sequences for any relational database provider that supports this.
    • See Specify caching for sequences for full details.
  • Specify fill-factor for keys and indexes

Improved tooling

  • Fewer rebuilds when using dotnet ef tools
    • EF9 invalidates build caches less often, resulting in faster re-builds.
    • See Fewer rebuilds for full details.

Everything else in preview 2

Preview 2 contains:

EF Core 9 preview 2 (and Microsoft.Data.Sqlite) contains work from the EF Team at Microsoft (@roji @AndriySvyryd @maumar @ajcvickers) as well as contributions from the EF Core community. The community PRs in EF9 Preview 1 are:

v7.0.17

1 month ago

EF Core 7.0.17 is available on NuGet now. This is a patch release of EF Core 7 containing only important bug fixes:

v6.0.28

1 month ago

This is a patch release of EF Core 6.0 containing only updates to dependencies. There are no additional fixes in this release beyond those already shipped in EF Core 6.1.27.

v9.0.0-preview.1.24081.2

2 months ago

The team has been working primarily on EF Core internals, so there are no new big features in EF Core 9 (EF9) Preview 1. However, this means we really need people like you to run your code on these new internals and report back what you find. We want to fix bugs in the new internals as soon as possible in order to have a strong GA release later in the year.

That being said, there are also several smaller enhancements included in preview 1. One of these might be just the thing you have been waiting for, so read on!

Improved queries

  • Prune columns passed to OPENJSON's WITH clause
    • EF9 removes unnecessary columns when calling OPENJSON WITH.
    • See Prune columns from JSON in the What's New docs for full details including runnable samples.
  • Translations involving GREATEST/LEAST
    • Several new translations have been introduced that use the GREATEST and LEAST SQL functions.
    • This includes translations of Math.Min and Math.Max in non-aggregate queries, as well as directly exposing the GREATEST and LEAST SQL functions in relational providers.
    • See GREATEST/LEAST translations in the What's New docs for full details including runnable samples.
  • Force or prevent query parameterization
    • Except in some special cases, EF Core parameterizes variables used in a LINQ query, but includes constants in the generated SQL. EF9 allows constants to be translated to parameters and variables to be translated to constants on a case to case basis.
    • See Force or prevent query parameterization in the What's New docs for full details including runnable samples.

ExecuteUpdate

  • Allow passing complex type instances to ExecuteUpdate
    • EF9 supports directly passing complex type instances to ExecuteUpdate as sugar for updating all member values.
    • See ExecuteUpdate for complex types in the What's New docs for full details including runnable samples.

Temporal tables

  • Small migrations for temporal tables
    • The migration created when changing an existing table into a temporal table has been reduced in size for EF9.
    • See Improved temporal table migrations in the What's New docs for full details including runnable samples.

Model building

  • Make existing model building conventions more extensible
    • In EF9, we have made it easier to extend some of the existing conventions, such as those for property and key discovery.
    • See Extensible model building conventions in the What's New docs for full details including runnable samples.
  • ApplyConfigurationsFromAssembly calls non-public constructors

Everything else in Preview 1

Preview 1 contains:

EF Core 9 Preview 1 contains work from the EF Team at Microsoft (@roji @AndriySvyryd @maumar @ajcvickers) as well as contributions from the EF Core community. The community PRs in EF9 Preview 1 are:

v8.0.2

2 months ago

EF Core 8.0.2 is available on NuGet now. This is a patch release of EF Core 8 (EF8) containing only important bug fixes: