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!
Entity Framework Core 9 Preview 1:
- Discussion
- What's new in EF Core 9 documentation.
- Documentation & Samples
.NET 9 Preview 1:
- 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.
- EF9 removes unnecessary columns when calling
- Translations involving GREATEST/LEAST
- Several new translations have been introduced that use the
GREATEST
andLEAST
SQL functions. - This includes translations of
Math.Min
andMath.Max
in non-aggregate queries, as well as directly exposing theGREATEST
andLEAST
SQL functions in relational providers. - See GREATEST/LEAST translations in the What's New docs for full details including runnable samples.
- Several new translations have been introduced that use the
- 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.
- 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.
- EF9 supports directly passing complex type instances to
- 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.
- 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
- In EF9, we have both improved the error messages generated when this fails, and also enabled instantiation by non-public constructor.
- See ApplyConfigurationsFromAssembly calls non-public constructors in the What's New docs for full details including runnable samples.
Preview 1 contains: