EF Core 9.0 Preview 2
Pre-releaseThe 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.
- The
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
- EF9 supports specification of the SQL Server fill-factor when using EF Core Migrations to create keys and indexes.
- See Specify fill-factor for keys and indexes for full details.
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:
- @Poppyto: stackalloc for BytesToDecimal
- @francopettinari: Microsoft.Data.Sqlite.Core issue with multiple Blob colums
- @wertzui: Added
ToHashSetAsync<T>
Extension methods onIQueryable<T>
- @Suchiman: Fix incremental builds
- @btecu: Cleanup asserts
- @EngincanV: Fix typos on DeleteBehavior.cs
- @petterh: Fix typos, doubled words
- @deano-hunter: Add fill factor to keys and unique constraints