Latest news and progress on .NET 8 and EF8
January 19, 2023
Highlights
.NET 8 and EF8
The highly requested feature Raw SQL queries for unmapped types is now included in the 30+ enhancements ready for EF8 preview 1. For example, for some arbitrary type not included in the EF model:
public class PostSummary
{
public string BlogName { get; set; }
public string PostTitle { get; set; }
public DateTime PublishedOn { get; set; }
}
A SQL query can be used to return instances of this type:
var start = new DateTime(2022, 1, 1);
var end = new DateTime(2023, 1, 1);
var summaries =
await context.Database.SqlQuery<PostSummary>(
@$"SELECT b.Name AS BlogName, p.Title AS PostTitle, p.PublishedOn
FROM Posts AS p
INNER JOIN Blogs AS b ON p.BlogId = b.Id
WHERE p.PublishedOn >= {start} AND p.PublishedOn < {end}")
.ToListAsync();
The start and end dates will be appropriately parameterized, keeping the query safe and efficient.
The SqlQuery method can also be used to query views, execute stored procedures, or call database functions.
Don't wait for preview 1; try it now using the daily builds! The daily builds work on both .NET 6 and .NET 7.
EF7 patch releases
A 7.0.3 release of EF7 is planned for February containing important bug fixes. Remember that all these fixes are already available for .NET 6 and .NET 7 in the daily builds.
Community Standup: Entity Framework Core FAQs
In the latest .NET Data Community Standup, the Microsoft .NET Data Access team shared answers to many frequently asked questions about EF Core. For example:
- What's the difference between EF Core and EF6?
- What NuGet packages to I need to install to use EF Core?
- Should I always use no-tracking queries?
- Why does EF Core sometimes ignore Includes?
- What's wrong with using owned types for value objects?
- Should I create a repository over EF Core?
- Why does the in-memory database not work in my tests?
- How do I call stored procedures from EF Core?
- How do I see the SQL for a LINQ query?
You can watch all .NET Data Community Standups on YouTube. We live-stream every other Wednesday to Twitch, YouTube, and Twitter. Comment on GitHub with ideas for guests, demos, or anything else you want to see.
EF Core 8 (EF8)
EF Core 8 (EF8) will be the next release after EF Core 7.0. It will be released alongside .NET 8 in November 2023.
The EF Core 8 Plan is available publicly in our documentation. As always, feedback is greatly appreciated. This plan is not set-in-stone; we expect it will evolve throughout the release cycle as we learn.
Each high-level area for EF Core 8 is linked in the table below together with its current high-level status.
Burndown for EF8
This is the burndown chart the team uses internally to track progress on EF Core 8.
- The upper chart shows work committed for EF8
- The lower chart shows work completed for EF8
- On each chart:
- Enhancements are in green and are shown at the bottom
- Bugs are in red and are stacked in the middle
- Other issues are in blue and stacked at the top
EF Core 7.0.2 (EF7)
EF Core 7.0.2 is available on NuGet now. This is a patch release of EF Core 7 containing only important bug fixes:
EF Core 6.0.13
EF Core 6.0.13 is available on NuGet now. This is a patch release of EF Core 6 containing only updates to dependencies. There are no additional fixes in this release beyond those already shipped in EF Core 6.0.12.
Pull requests merged since the last update
Community contributions
- @nbarbettini: Fix grammar in XML doc for ToQueryString
- @DoctorKrolic: Remove unnecessary dependency on MS.CA.VB package
- @alhad-deshpande: Updating SQLitePCLRaw library versions to 2.1.3 as it has ppc64le
- @gurustron: Fix typo in ApplyConfigurationsFromAssembly XML doc
- @yanxiaodi: Add the configuration for System.Text.Json to fix the cycle reference
- @JonathanMagnan: Update index.md
- @YuraRov: Rename identifier in ThenInclude method (Cartesian explosion section)
- @kaypee90: Fixes identified grammatical errors and spelling mistakes in What's New in EF Core 7.0
- @ascott18: Clarify that both filtered include examples are valid
Many thanks to all our contributors!
EF Core
- Documentation
- Query
- Dependencies
- Scaffolding
- SaveChanges
- Model Building
- Change tracking
- Miscellaneous
- Migrations
- DbContext API
Microsoft.Data.Sqlite
Builds to use
- The daily builds are the most up-to-date available.
- The daily builds now contain all issues merged for 7.0.x patch releases, as well as new code to be released in EF8 previews.
- The daily builds work on both .NET 6 and .NET 7.
- Current: EF Core 7.0.2
- LTS: EF Core 6.0.13
Releases
See GitHub Releases and EF Core releases and planning (Roadmap) in our documentation for full details.
Weekly/biweekly updates from previous years
Feedback
Comments are disabled on this issue to reduce noise. Please use the related discussion issue for any comments on these status updates.
January 5, 2023
Expand to see status from this week...
Highlights
.NET 8 and EF8
Work for .NET 8 and EF8 is well underway, with more than 70 GitHub issues already fixed. This includes 29 enhancements such as:
- Lazy-loading for no-tracking queries
- Opt-out of lazy-loading for specific navigations
- Reverse engineering for Synapse Serverless SQL Pool and Dynamics 365 TDS Endpoint
- Lookup tracked entities by primary key, alternate key, or foreign key
- MaxLength set by convention for TPH discriminator columns
Don't wait for preview 1; get all these changes now using the daily builds! The daily builds work on both .NET 6 and .NET 7.
EF7 patch releases
A 7.0.3 release of EF7 is planned for February containing important bug fixes. Remember that all these fixes are already available for .NET 6 and .NET 7 in the daily builds.
EF Core 3.1 is now out-of-support
Just a reminder that .NET Core 3.1 and EF Core 3.1 went out-of-support on December 13, 2022. EF Core 5.0 is also out-of-support, so please update to EF Core 7.0 or EF Core 6.0 for long-term-support.
Community Standup: The plan for EF8
The plan has been published for EF Core 8 and other data access work in .NET 8. This includes work in five major themes:
- Highly requested features
- Cloud native and devices
- Performance
- Visual tooling
- Developer experience
Join the .NET Data Team for a discussion of what’s in and what’s out.
You can watch all .NET Data Community Standups on YouTube. We live-stream every other Wednesday to Twitch, YouTube, and Twitter. Comment on GitHub with ideas for guests, demos, or anything else you want to see.
EF Core 8 (EF8)
EF Core 8 (EF8) will be the next release after EF Core 7.0. It will be released alongside .NET 8 in November 2023.
The EF Core 8 Plan is available publicly in our documentation. As always, feedback is greatly appreciated. This plan is not set-in-stone; we expect it will evolve throughout the release cycle as we learn.
Each high-level area for EF Core 8 is linked in the table below together with its current high-level status.
Burndown for EF8
This is the burndown chart the team uses internally to track progress on EF Core 8.
- The upper chart shows work committed for EF8
- The lower chart shows work completed for EF8
- On each chart:
- Enhancements are in green and are shown at the bottom
- Bugs are in red and are stacked in the middle
- Other issues are in blue and stacked at the top
EF Core 7.0.1 (EF7)
EF Core 7.0.1 is available on NuGet now. This is a patch release of EF Core 7 containing only updates to dependencies. There are no additional fixes in this release beyond those already shipped in EF Core 7.0.0.
EF Core 6.0.12
EF Core 6.0.12 is available on NuGet now. This is a patch release of EF Core 6 containing only important bug fixes:
- string.IndexOf throws NullReferenceException when applied on the result of a DbFunction
- Function StoreType is ignored for DateTime
- RelationalMethodCallTranslatorProvider and explicit typeMapping
Pull requests merged since the last update
Community contributions
- @R4ND3LL: Added extension reference for Entity Framework Ruler
- @Zailef: Fix minor typo 'initializs' => 'initializes'
- @yangzhongke: Add the introduction to LessCode.EFCore.StronglyTypedId
- @GhalamborM: Update index.md
- @ErikEJ: Add new extension
Many thanks to all our contributors!
EF Core
- Documentation
- Clean up and document local DetectChanges behavior, plus other API doc
- Fix HTTP links in messages to use HTTPS
- Document conventions and related model building concepts
- Add (and remove) some 7's (and one 6)
- Clarify the trigger convention's usage in the breaking change note
- Add note on SqlClient async issues in perf docs
- Bump Newtonsoft.Json from 13.0.1 to 13.0.2 in /samples/core/ChangeTracking/IdentityResolutionInEFCore
- The plan for EF8
- Fix EF8 links
- Link to API docs for EF 7
- Correct xmldocs on dependency objects to mention the with operator
- Move EF Core 3.1 and 5.0 under out-of-support in TOC
- Query
- SQLite: Use infix GLOB and REGEXP operators
- Use correct parameter in query based on type mapping
- Json/Query: translate element access of a json array
- Throw if CompiledQuery is used with different models
- Add static Print methods to ExpressionPrinter
- Most of explicit and lazy loading for no-tracking queries
- Identity resolution for loading detached entities
- Minor test refactoring and enabling
- Flow query tracking behavior to materialization interceptor
- Json: improve projection deduplication for scenarios containing collection indexers
- SQLite: Simplify !Regex.IsMatch to NOT REGEXP
- Proxies
- SaveChanges
- (7.0.2) Fix SQL Server result mapping for bulk insert
- Fix SQL Server bulk insert edge case
- Remove s from AppendInsertAndSelectOperations
- Fix bug where a non-sproc command comes before a sproc command
- Make unique index SaveChanges topological dependency optional for null values
- Update discriminator columns when PK-to-PK dependent type is changed
- (7.0.3) Avoid circular dependency for unique indexes with null values
- (7.0.3) Update discriminator columns when PK-to-PK dependent type is changed
- (7.0.3) Fix bug where a non-sproc command comes before a sproc command
- (7.0.3) Fix SQL Server bulk insert edge case
- Model Building
- Allow shared columns with nullable value converters
- Avoid redundant looping in property metadata
- Allow underscores in identifiers again
- Don't try to discover FK properties when conflicting with 2 or more other FKs
- Allow SQLServer Sequence/HiLo on non-key properties
- Don't validate shared columns have the same provider type unless they are used in a key, foreign key or a unique index
- Set max length for string discriminator properties
- HasMaxLength(-1) sets unbounded max length
- Allow lazy-loading to be configured per navigation
- Warn when entity type, property, or navigation is ignored after being explicitly mapped
- Allow service properties typed as object
- (7.0.3) Revert shared columns validation breaking change
- (7.0.3) Avoid infinite loop during foreign key discovery
- (7.0.3) Allow underscores in identifiers again
- (7.0.3) Avoid redundant looping in property metadata
- (7.0.3) Allow shared columns with nullable value converters
- Type mapping
- Ensure that facets specified in the store type name take precedence
- SQLite type mapping should not be returned without converter when CLR type does not match
- Handle row-version columns in owned types with conversions
- Fix in-memory issues with value comparers
- Fix relational mapping hints and add DbType
- Long and ULong properties marked as rowversion automatically convert to binary on SQL Server
- Use case-insensitive string comparisons by default on SQL Server
- Change tracking
- Dependencies
- Miscellaneous
- Scaffolding
- Migrations
- Bulk updates
- DbContext API
Builds to use
- The daily builds are the most up-to-date available.
- The daily builds now contain all issues merged for 7.0.x patch releases, as well as new code to be released in EF8 previews.
- The daily builds work on both .NET 6 and .NET 7.
- Current: EF Core 7.0.1
- LTS: EF Core 6.0.12
Releases
See GitHub Releases and EF Core releases and planning (Roadmap) in our documentation for full details.
Weekly/biweekly updates from previous years
Feedback
Comments are disabled on this issue to reduce noise. Please use the related discussion issue for any comments on these status updates.
January 19, 2023
Expand to see status from this week...
Highlights
.NET 8 and EF8
The highly requested feature Raw SQL queries for unmapped types is now included in the 30+ enhancements ready for EF8 preview 1. For example, for some arbitrary type not included in the EF model:
public class PostSummary
{
public string BlogName { get; set; }
public string PostTitle { get; set; }
public DateTime PublishedOn { get; set; }
}
A SQL query can be used to return instances of this type:
var start = new DateTime(2022, 1, 1);
var end = new DateTime(2023, 1, 1);
var summaries =
await context.Database.SqlQuery<PostSummary>(
@$"SELECT b.Name AS BlogName, p.Title AS PostTitle, p.PublishedOn
FROM Posts AS p
INNER JOIN Blogs AS b ON p.BlogId = b.Id
WHERE p.PublishedOn >= {start} AND p.PublishedOn < {end}")
.ToListAsync();
The start and end dates will be appropriately parameterized, keeping the query safe and efficient.
The SqlQuery method can also be used to query views, execute stored procedures, or call database functions.
Don't wait for preview 1; try it now using the daily builds! The daily builds work on both .NET 6 and .NET 7.
EF7 patch releases
A 7.0.3 release of EF7 is planned for February containing important bug fixes. Remember that all these fixes are already available for .NET 6 and .NET 7 in the daily builds.
Community Standup: Entity Framework Core FAQs
In the latest .NET Data Community Standup, the Microsoft .NET Data Access team shared answers to many frequently asked questions about EF Core. For example:
- What's the difference between EF Core and EF6?
- What NuGet packages to I need to install to use EF Core?
- Should I always use no-tracking queries?
- Why does EF Core sometimes ignore Includes?
- What's wrong with using owned types for value objects?
- Should I create a repository over EF Core?
- Why does the in-memory database not work in my tests?
- How do I call stored procedures from EF Core?
- How do I see the SQL for a LINQ query?
You can watch all .NET Data Community Standups on YouTube. We live-stream every other Wednesday to Twitch, YouTube, and Twitter. Comment on GitHub with ideas for guests, demos, or anything else you want to see.
EF Core 8 (EF8)
EF Core 8 (EF8) will be the next release after EF Core 7.0. It will be released alongside .NET 8 in November 2023.
The EF Core 8 Plan is available publicly in our documentation. As always, feedback is greatly appreciated. This plan is not set-in-stone; we expect it will evolve throughout the release cycle as we learn.
Each high-level area for EF Core 8 is linked in the table below together with its current high-level status.
Burndown for EF8
This is the burndown chart the team uses internally to track progress on EF Core 8.
- The upper chart shows work committed for EF8
- The lower chart shows work completed for EF8
- On each chart:
- Enhancements are in green and are shown at the bottom
- Bugs are in red and are stacked in the middle
- Other issues are in blue and stacked at the top
EF Core 7.0.2 (EF7)
EF Core 7.0.2 is available on NuGet now. This is a patch release of EF Core 7 containing only important bug fixes:
EF Core 6.0.13
EF Core 6.0.13 is available on NuGet now. This is a patch release of EF Core 6 containing only updates to dependencies. There are no additional fixes in this release beyond those already shipped in EF Core 6.0.12.
Pull requests merged since the last update
Community contributions
- @nbarbettini: Fix grammar in XML doc for ToQueryString
- @DoctorKrolic: Remove unnecessary dependency on MS.CA.VB package
- @alhad-deshpande: Updating SQLitePCLRaw library versions to 2.1.3 as it has ppc64le
- @gurustron: Fix typo in ApplyConfigurationsFromAssembly XML doc
- @yanxiaodi: Add the configuration for System.Text.Json to fix the cycle reference
- @JonathanMagnan: Update index.md
- @YuraRov: Rename identifier in ThenInclude method (Cartesian explosion section)
- @kaypee90: Fixes identified grammatical errors and spelling mistakes in What's New in EF Core 7.0
- @ascott18: Clarify that both filtered include examples are valid
Many thanks to all our contributors!
EF Core
- Documentation
- Query
- Dependencies
- Scaffolding
- SaveChanges
- Model Building
- Change tracking
- Miscellaneous
- Migrations
- DbContext API
Microsoft.Data.Sqlite
Builds to use
- The daily builds are the most up-to-date available.
- The daily builds now contain all issues merged for 7.0.x patch releases, as well as new code to be released in EF8 previews.
- The daily builds work on both .NET 6 and .NET 7.
- Current: EF Core 7.0.2
- LTS: EF Core 6.0.13
Releases
See GitHub Releases and EF Core releases and planning (Roadmap) in our documentation for full details.
Weekly/biweekly updates from previous years
Feedback
Comments are disabled on this issue to reduce noise. Please use the related discussion issue for any comments on these status updates.
February 2, 2023
Expand to see status from this week...
Highlights
.NET 8 and EF8
New for EF8: DateOnly and TimeOnly mapping for SQL Server and Azure SQL!
Thanks to a community contribution from @ErikEJ, DateOnly and TimeOnly are now supported in Microsoft.Data.SqlClient. We have built on this to add support ready for EF Core 8 Preview 1. DateOnly and TimeOnly are mapped to the T-SQL date and time types respectively. For example, the following entity type:
public class School
{
public int Id { get; set; }
public string Name { get; set; }
public DateOnly Founded { get; set; }
public TimeOnly OpensAt { get; set; }
public TimeOnly ClosedAt { get; set; }
public List<Term> Terms { get; } = new();
}
Maps to this table:
CREATE TABLE [Schools] (
[Id] int NOT NULL IDENTITY,
[Name] nvarchar(max) NOT NULL,
[Founded] date NOT NULL,
[OpensAt] time NOT NULL,
[ClosedAt] time NOT NULL,
CONSTRAINT [PK_Schools] PRIMARY KEY ([Id])
);
For Database First workflows, date and time columns will be reverse-engineered (scaffolded) to DateOnly and TimeOnly properties.
Full CRUD operations are supported with DateOnly and TimeOnly. For example, the following LINQ query:
var now = DateOnly.FromDateTime(DateTime.UtcNow);
var currentTerms = await context.Schools
.Include(s => s.Terms.Where(t => t.FirstDay <= now && t.LastDay >= now))
.ToListAsync();
Generates the following T-SQL query:
SELECT [s].[Id], [s].[ClosedAt], [s].[Founded], [s].[Name], [s].[OpensAt], [t0].[Id], [t0].[FirstDay], [t0].[LastDay], [t0].[Name], [t0].[SchoolId]
FROM [Schools] AS [s]
LEFT JOIN (
SELECT [t].[Id], [t].[FirstDay], [t].[LastDay], [t].[Name], [t].[SchoolId]
FROM [Term] AS [t]
WHERE [t].[FirstDay] <= @__now_0 AND [t].[LastDay] >= @__now_0
) AS [t0] ON [s].[Id] = [t0].[SchoolId]
ORDER BY [s].[Id]
EF7 patch releases
A 7.0.3 release of EF7 is planned for February containing important bug fixes. Remember that all these fixes are already available for .NET 6 and .NET 7 in the daily builds.
Azure Cosmos DB Live TV: Streamline Your Data Access with Entity Framework Core
In this episode of Azure Cosmos DB Live TV, Mark Brown welcomes Jiachen Jiang and Arthur Vickers (PM and Engineering Lead for Entity Framework Core) to discuss the experience that EF Core brings to the table for developers working with Azure Cosmos DB and when devs should consider using EF Core for their project.
Community Standup: Entity Framework Core FAQs
In the latest .NET Data Community Standup, the Microsoft .NET Data Access team shared answers to many frequently asked questions about EF Core. For example:
- What's the difference between EF Core and EF6?
- What NuGet packages to I need to install to use EF Core?
- Should I always use no-tracking queries?
- Why does EF Core sometimes ignore Includes?
- What's wrong with using owned types for value objects?
- Should I create a repository over EF Core?
- Why does the in-memory database not work in my tests?
- How do I call stored procedures from EF Core?
- How do I see the SQL for a LINQ query?
You can watch all .NET Data Community Standups on YouTube. We live-stream every other Wednesday to Twitch, YouTube, and Twitter. Comment on GitHub with ideas for guests, demos, or anything else you want to see.
EF Core 8 (EF8)
EF Core 8 (EF8) will be the next release after EF Core 7.0. It will be released alongside .NET 8 in November 2023.
The EF Core 8 Plan is available publicly in our documentation. As always, feedback is greatly appreciated. This plan is not set-in-stone; we expect it will evolve throughout the release cycle as we learn.
Each high-level area for EF Core 8 is linked in the table below together with its current high-level status.
Burndown for EF8
This is the burndown chart the team uses internally to track progress on EF Core 8.
- The upper chart shows work committed for EF8
- The lower chart shows work completed for EF8
- On each chart:
- Enhancements are in green and are shown at the bottom
- Bugs are in red and are stacked in the middle
- Other issues are in blue and stacked at the top
EF Core 7.0.2 (EF7)
EF Core 7.0.2 is available on NuGet now. This is a patch release of EF Core 7 containing only important bug fixes:
EF Core 6.0.13
EF Core 6.0.13 is available on NuGet now. This is a patch release of EF Core 6 containing only updates to dependencies. There are no additional fixes in this release beyond those already shipped in EF Core 6.0.12.
Pull requests merged since the last update
Community contributions
- @lorcQc: EFCore.VisualBasic now supports EF7
- @dualbios: Update index.md
- @michaelrp: Very minor grammar update
- @ricardodsanchez: Update commit-failures.md
- @vorsprungdev: Update choosing-a-testing-strategy.md
- @ar1k: Remove duplicate word
Many thanks to all our contributors!
EF Core
- Documentation
- Query
- Migrations
- Dependencies
- Scaffolding
- SaveChanges
- Model Building
Builds to use
- The daily builds are the most up-to-date available.
- The daily builds now contain all issues merged for 7.0.x patch releases, as well as new code to be released in EF8 previews.
- The daily builds work on both .NET 6 and .NET 7.
- Current: EF Core 7.0.2
- LTS: EF Core 6.0.13
Releases
See GitHub Releases and EF Core releases and planning (Roadmap) in our documentation for full details.
Weekly/biweekly updates from previous years
Feedback
Comments are disabled on this issue to reduce noise. Please use the related discussion issue for any comments on these status updates.
February 16, 2023
Expand to see status from this week...
Highlights
EF Core 7.0.3
EF Core 7.0.3 is on NuGet now. This patch release contains many important bug fixes for EF7. If you're using EF7, then update now! If you're not using EF7, then what are you waiting for? It runs on .NET 6 or 7.
GitHub repo survey
We want your feedback on what we are doing well and what we could do better in our GitHub repo.
Community Standup: SQLite with .NET and EF Core
In the latest .NET Data Community Standup, Eric Sink (creator of SQLitePCL.raw) and Brice Lambson (creator of Microsoft.Data.Sqlite) join the .NET Data Access Team to discuss everything SQLite on .NET. We start down low digging into different ways to get the SQLite native binaries using Eric’s packages. Then move up the stack to look at the basics of SQLite on .NET with Brice’s ADO.NET provider. Going higher still, we’ll look at how to get the most from SQLite using Dapper or EF Core.
You can watch all .NET Data Community Standups on YouTube. We live-stream every other Wednesday to Twitch, YouTube, and Twitter. Comment on GitHub with ideas for guests, demos, or anything else you want to see.
EF Core 8 (EF8)
EF Core 8 (EF8) will be the next release after EF Core 7.0. It will be released alongside .NET 8 in November 2023.
The EF Core 8 Plan is available publicly in our documentation. As always, feedback is greatly appreciated. This plan is not set-in-stone; we expect it will evolve throughout the release cycle as we learn.
Each high-level area for EF Core 8 is linked in the table below together with its current high-level status.
Burndown for EF8
This is the burndown chart the team uses internally to track progress on EF Core 8.
- The upper chart shows work committed for EF8
- The lower chart shows work completed for EF8
- On each chart:
- Enhancements are in green and are shown at the bottom
- Bugs are in red and are stacked in the middle
- Other issues are in blue and stacked at the top
EF Core 7.0.3
EF Core 7.0.3 is available on NuGet now. This is a patch release of EF Core 7 containing only important bug fixes:
- Add-Migration fails with "An item with the same key has already been added" when renaming entity
- ExecuteUpdate fails when target entity has an owned entity
- EF Core 7 Rev eng: Missing HasForeignKey when referencing a navigation property with a unique constraint with DataAnnotations on
- Change in behaviour of CSharpHelper.Identifier(string name)
- NullReferenceException scaffolding when no primary key set
- Idempotent migration script not working on EFCore7.0 for AlterColumn when nullable changed from true to false
- 6.0.11 to 7.0.0: [...] are both mapped to column [..] but are configured to use differing provider types ('double' and 'double?').'
- Generated Model Snapshot throws InvalidOperationException
- SQL Server bulk insert broken when new command applies pending commands and goes over the batch parameter limit
- Invalid singularization when scaffolding a manytomany table
- In EF7, SqLite unable to load spatialite using the NetTopologySuite Package
- Cannot access property through interface in ExecuteUpdate setter lambda
- DbContext scaffold missing IndexerProperty for M2M relation after moving to EF Core 7
- Performance regression in model building in Entity Framework Core 7
- Mixing sproc and non-sproc commands in the same batch may fail with a NullReferenceException
- Condition's order will cause different result when using .Contains() to search string cross varchar and nvarchar columns
- SaveChanges circular dependency in unique unfiltered index
- QueryTrackingBehavior resets to TrackAll when using DbContext pooling
- EFCore 7.0.0 - Graph of entity insertion throws a FK exception
- Replacing PK to PK TPH dependent with different type fails
- dotnet ef migrations add freezes
- InvalidOperationException when mapping properties of different types to the same column
- Obsoletion message for AutoTransactionsEnabled is wrong
- Incorrect NullReferenceException for parameter in split query with GroupBy
EF Core 6.0.14
EF Core 6.0.14 is available on NuGet now. This is a patch release of EF Core 6 containing only updates to dependencies. There are no additional fixes in this release beyond those already shipped in EF Core 6.0.13.
Pull requests merged since the last update
Community contributions
- @coltskeen: Fixing breaking-changes.md typo
- @dawei-wang: Fix typo
Many thanks to all our contributors!
EF Core
- Model Building
- Migrations
- Documentation
- Change tracking
- Query
- Type mapping
- Miscellaneous
- Cosmos
Microsoft.Data.Sqlite
Builds to use
- The daily builds are the most up-to-date available.
- The daily builds now contain all issues merged for 7.0.x patch releases, as well as new code to be released in EF8 previews.
- The daily builds work on both .NET 6 and .NET 7.
- Current: EF Core 7.0.3
- LTS: EF Core 6.0.14
Releases
See GitHub Releases and EF Core releases and planning (Roadmap) in our documentation for full details.
Weekly/biweekly updates from previous years
Feedback
Comments are disabled on this issue to reduce noise. Please use the related discussion issue for any comments on these status updates.
March 2, 2023
Expand to see status from this week...
Highlights
New in the daily builds (aka.ms/ef-daily-builds)
- Official support for SQL Server HierarchyID - with contributions from @aljones, @cutig3r, @huan086, @kmataru, @mehdihaghshenas, @vyrotek, and the team
- Support for JSON columns in SQLite
- Support JSON columns in compiled models
Plus, EF8 Preview 1 is on NuGet now!
- Raw SQL queries for unmapped types
- DateOnly and TimeOnly support for SQL Server
- Lazy-loading for no-tracking queries
- Lazy-loading opt-out for navigations
- Reverse engineering for Synapse/Dynamics 365 TDS
- Lookup tracked entities by key or foreign key
- MaxLength set by convention for TPH discriminators
Complete documentation on What's New in Preview 1, with runnable samples: aka.ms/ef8-new
Community Standup: MySQL and .NET
In the latest .NET Data Community Standup, the .NET Data Access Team is joined by Bradley Grainger and Laurents Meyer, authors of the open-source MySQL ADO.NET driver and of the Pomelo EF Core provider. Both these components work together to provide a 1st-class MySQL data access experience in .NET. We discuss some of the specifities of MySQL as a database and what it's like to work on open source data projects in .NET.
You can watch all .NET Data Community Standups on YouTube. We live-stream every other Wednesday to Twitch, YouTube, and Twitter. Comment on GitHub with ideas for guests, demos, or anything else you want to see.
EF Core 8 (EF8)
EF Core 8 (EF8) will be the next release after EF Core 7.0. It will be released alongside .NET 8 in November 2023.
The EF Core 8 Plan is available publicly in our documentation. As always, feedback is greatly appreciated. This plan is not set-in-stone; we expect it will evolve throughout the release cycle as we learn.
Each high-level area for EF Core 8 is linked in the table below together with its current high-level status.
Burndown for EF8
This is the burndown chart the team uses internally to track progress on EF Core 8.
- The upper chart shows work committed for EF8
- The lower chart shows work completed for EF8
- On each chart:
- Enhancements are in green and are shown at the bottom
- Bugs are in red and are stacked in the middle
- Other issues are in blue and stacked at the top
EF Core 7.0.3
EF Core 7.0.3 is available on NuGet now. This is a patch release of EF Core 7 containing only important bug fixes:
- Add-Migration fails with "An item with the same key has already been added" when renaming entity
- ExecuteUpdate fails when target entity has an owned entity
- EF Core 7 Rev eng: Missing HasForeignKey when referencing a navigation property with a unique constraint with DataAnnotations on
- Change in behaviour of CSharpHelper.Identifier(string name)
- NullReferenceException scaffolding when no primary key set
- Idempotent migration script not working on EFCore7.0 for AlterColumn when nullable changed from true to false
- 6.0.11 to 7.0.0: [...] are both mapped to column [..] but are configured to use differing provider types ('double' and 'double?').'
- Generated Model Snapshot throws InvalidOperationException
- SQL Server bulk insert broken when new command applies pending commands and goes over the batch parameter limit
- Invalid singularization when scaffolding a manytomany table
- In EF7, SqLite unable to load spatialite using the NetTopologySuite Package
- Cannot access property through interface in ExecuteUpdate setter lambda
- DbContext scaffold missing IndexerProperty for M2M relation after moving to EF Core 7
- Performance regression in model building in Entity Framework Core 7
- Mixing sproc and non-sproc commands in the same batch may fail with a NullReferenceException
- Condition's order will cause different result when using .Contains() to search string cross varchar and nvarchar columns
- SaveChanges circular dependency in unique unfiltered index
- QueryTrackingBehavior resets to TrackAll when using DbContext pooling
- EFCore 7.0.0 - Graph of entity insertion throws a FK exception
- Replacing PK to PK TPH dependent with different type fails
- dotnet ef migrations add freezes
- InvalidOperationException when mapping properties of different types to the same column
- Obsoletion message for AutoTransactionsEnabled is wrong
- Incorrect NullReferenceException for parameter in split query with GroupBy
EF Core 6.0.14
EF Core 6.0.14 is available on NuGet now. This is a patch release of EF Core 6 containing only updates to dependencies. There are no additional fixes in this release beyond those already shipped in EF Core 6.0.13.
Pull requests merged since the last update
Community contributions
- @aljones, @cutig3r, @huan086, @kmataru, @mehdihaghshenas, @vyrotek: SqlServer: Support hierarchyid
- @AinoraZ: Ainoraz.EFCore.IncludeBuilder supports EF7
Many thanks to all our contributors!
EF Core
- Query
- Added nullable property to Json mapped model resulting in errors instead of mapping non existing json property to null
- Evaluate SqlServerConvertTranslator.SupportedMethods once
- Adding procedural test generation to test interactions between various operators
- Use NormalizeDelimitersInRawString in Ad_hoc_query_for_shared_type_entity_type_works
- Documentation
- JSON
- Miscellaneous
- Dependencies
- Scaffolding
Builds to use
- The daily builds are the most up-to-date available.
- The daily builds now contain all issues merged for 7.0.x patch releases, as well as new code to be released in EF8 previews.
- The daily builds work on both .NET 6 and .NET 7.
- Preview: EF Core 8 Preview 1
- Preview releases lag behind the daily build. We recommend using the daily builds whenever possible.
- Current: EF Core 7.0.3
- LTS: EF Core 6.0.14
Releases
See GitHub Releases and EF Core releases and planning (Roadmap) in our documentation for full details.
Weekly/biweekly updates from previous years
Feedback
Comments are disabled on this issue to reduce noise. Please use the related discussion issue for any comments on these status updates.
March 16, 2023
Expand to see status from this week...
Highlights
EF8 Preview 2 is on NuGet now!
Preview 2 contains support for JSON column mapping on SQLite and official* support for the hierarchyid type on SQL Server.
Hierarchy IDs are used to map tree structures. For example, the diagram below shows the hierarchy ID mappings for a paternal family tree of halflings:

We can then use these mappings to, for example, find the common ancestor of Bilbo and Frodo:
async Task<Halfling?> FindCommonAncestor(Halfling first, Halfling second)
=> await context.Halflings
.Where(
ancestor => first.PathFromPatriarch.IsDescendantOf(ancestor.PathFromPatriarch)
&& second.PathFromPatriarch.IsDescendantOf(ancestor.PathFromPatriarch))
.OrderByDescending(ancestor => ancestor.PathFromPatriarch.GetLevel())
.FirstOrDefaultAsync();
Which translates to:
SELECT TOP(1) [h].[Id], [h].[Name], [h].[PathFromPatriarch], [h].[YearOfBirth]
FROM [Halflings] AS [h]
WHERE @__first_PathFromPatriarch_0.IsDescendantOf([h].[PathFromPatriarch]) = CAST(1 AS bit)
AND @__second_PathFromPatriarch_1.IsDescendantOf([h].[PathFromPatriarch]) = CAST(1 AS bit)
ORDER BY [h].[PathFromPatriarch].GetLevel() DESC
And the answer is, of course, Balbo.
See aka.ms/ef8-new for more fun with halflings and other documentation for Preview 1 and Preview 2. With runnable samples on GitHub!
*Unofficial support for hierarchyid in EF Core has been available for many years via the EntityFrameworkCore.SqlServer.HierarchyId package. This package has been maintained as a collaboration between the community and the EF team. Now that there is official support for hierarchyid in .NET, the code from this community package forms, with the permission of the original contributors, the basis for the official package described here. Many thanks to all those involved over the years, including @aljones, @cutig3r, @huan086, @kmataru, @mehdihaghshenas, @vyrotek, and @yuryjhol.
Community Standup: IQueryable, LINQ and the EF Core query pipeline
In the latest .NET Data Community Standup, 2000 viewers joined us over the course of a nearly two hour event to dive deep under the hood and see how EF Core processes LINQ queries, translates them to SQL and executes them on your database. We introduced key concepts such as IQueryable and LINQ providers, and looked into how EF Core uses caching to make your querying lightning-fast.
You can watch all .NET Data Community Standups on YouTube. We live-stream every other Wednesday to Twitch, YouTube, and Twitter. Comment on GitHub with ideas for guests, demos, or anything else you want to see.
EF Core 8 (EF8)
EF Core 8 (EF8) will be the next release after EF Core 7.0. It will be released alongside .NET 8 in November 2023.
The EF Core 8 Plan is available publicly in our documentation. As always, feedback is greatly appreciated. This plan is not set-in-stone; we expect it will evolve throughout the release cycle as we learn.
Each high-level area for EF Core 8 is linked in the table below together with its current high-level status.
Burndown for EF8
This is the burndown chart the team uses internally to track progress on EF Core 8.
- The upper chart shows work committed for EF8
- The lower chart shows work completed for EF8
- On each chart:
- Enhancements are in green and are shown at the bottom
- Bugs are in red and are stacked in the middle
- Other issues are in blue and stacked at the top
EF Core 7.0.4
EF Core 7.0.4 is available on NuGet now. This is a patch release of EF Core 7 containing only important bug fixes:
- Exception replacing multi-level relationship in EF7
- Deletion can cause error "The association between entity types A and B has been severed..."
- Non-empty second migration in TPC scheme using inheritance
- Entity Framework Core 7 keeps creating the same migration for Nullable DateTime field
- TPC mapping strategy not respecting default database schema during migration
- Count after Take throws "No column name was specified for column 1 of 't'."
And for Microsoft.Data.Sqlite:
EF Core 6.0.15
EF Core 6.0.15 is available on NuGet now. This is a patch release of EF Core 6 containing only updates to dependencies. There are no additional fixes in this release beyond those already shipped in EF Core 6.0.14.
Pull requests merged since the last update
Community contributions
- @Suchiman: Fix Typo
Many thanks to all our contributors!
EF Core
- Query
- Some fixes to SqlQueryTestBase
- Make test provider-agnostic
- Better exception when same parameter instance is reused in multiple lambdas
- Full management of SQL operator precedence/associativity
- EF7 generating incorrect SQL for the Concat/Union All
- Missing parentheses when using Expression.Or over bool (instead of OrElse)
- Stop checking store types for set operations
- (7.0.5) EF7 generating incorrect SQL for the Concat/Union All
- Duplicate table alias in generated select query (An item with the same key has already been added)
- Documentation
- JSON
- Updating property with conversion from string to other type fails on sql server
- (7.0.5) Added nullable property to Json mapped model resulting in errors instead of mapping non existing json property to null
- Optimize update path for single property element - don't wrap the value in json array
- Json column fails to materialize only when default interceptor used
- Migrations
- Model building
- In-memory database
- Dependencies
- Scaffolding
- Cosmos
- SaveChanges
- Change tracking
Microsoft.Data.Sqlite
Builds to use
- The daily builds are the most up-to-date available.
- The daily builds now contain all issues merged for 7.0.x patch releases, as well as new code to be released in EF8 previews.
- The daily builds work on both .NET 6 and .NET 7.
- Preview: EF Core 8 Preview 2
- Preview releases lag behind the daily build. We recommend using the daily builds whenever possible.
- Current: EF Core 7.0.4
- LTS: EF Core 6.0.15
Releases
See GitHub Releases and EF Core releases and planning (Roadmap) in our documentation for full details.
Weekly/biweekly updates from previous years
Feedback
Comments are disabled on this issue to reduce noise. Please use the related discussion issue for any comments on these status updates.
March 30, 2023
Expand to see status from this week...
Highlights
Major overall of the EF Core relationship mapping docs
Eight new pages covering:
- 12 one-to-many relationship examples
- 13 one-to-one relationship examples
- 16 many-to-many relationship examples
- Using foreign, primary, and alternate keys
- Navigation configuration
- What the relationship mapping conventions do
- Using mapping attributes/data annotations
- A glossary of terms
All with runnable code on GitHub!
Bonus: A simple intro to the basic concepts.
Other new documentation
- Modernized Installing EF Core docs
- Additional details in Scaffolding (Reverse Engineering) docs, including:
- More details on handling conncection strings and using User Secrets
- Clarification and examples for selecting tables, views, and schemas
- Example preserving database naming
- Scaffolding on many-to-many relationships
- Use of C# nullable reference types
- Approaches for scaffolding once verses repeated scaffolding
- Documentation for EntityTypeConfigurationAttribute
Progress on...
- Work has started on value objects support.
- The relational model can now be compiled, which is needed for AOT.
- Improved translation for
Containsin under way.
Community Standup: Using hierarchical data in SQL Server and PostgreSQL with EF Core
In the latest .NET Data Community Standup, the .NET Data Access Team demonstrated mapping hierarchical data structures to relational databases using EF Core. This included using “hierarchyid” on SQL Server/Azure SQL and “ltree” on PostgresSQL, with demos using a family tree structure. EF Core is used to write LINQ queries against the hierarchy to find ancestors and descendants in various ways, as well as perform manipulation of subtrees for updates. And, as always, we answered questions from the live audience.
You can watch all .NET Data Community Standups on YouTube. We live-stream every other Wednesday to Twitch, YouTube, and Twitter. Comment on GitHub with ideas for guests, demos, or anything else you want to see.
EF Core 8 (EF8)
EF Core 8 (EF8) will be the next release after EF Core 7.0. It will be released alongside .NET 8 in November 2023.
The EF Core 8 Plan is available publicly in our documentation. As always, feedback is greatly appreciated. This plan is not set-in-stone; we expect it will evolve throughout the release cycle as we learn.
Each high-level area for EF Core 8 is linked in the table below together with its current high-level status.
Burndown for EF8
This is the burndown chart the team uses internally to track progress on EF Core 8.
- The upper chart shows work committed for EF8
- The lower chart shows work completed for EF8
- On each chart:
- Enhancements are in green and are shown at the bottom
- Bugs are in red and are stacked in the middle
- Other issues are in blue and stacked at the top
EF Core 7.0.4
EF Core 7.0.4 is available on NuGet now. This is a patch release of EF Core 7 containing only important bug fixes:
- Exception replacing multi-level relationship in EF7
- Deletion can cause error "The association between entity types A and B has been severed..."
- Non-empty second migration in TPC scheme using inheritance
- Entity Framework Core 7 keeps creating the same migration for Nullable DateTime field
- TPC mapping strategy not respecting default database schema during migration
- Count after Take throws "No column name was specified for column 1 of 't'."
And for Microsoft.Data.Sqlite:
EF Core 6.0.15
EF Core 6.0.15 is available on NuGet now. This is a patch release of EF Core 6 containing only updates to dependencies. There are no additional fixes in this release beyond those already shipped in EF Core 6.0.14.
Pull requests merged since the last update
Community contributions
- @ilmalte: Create directory chain if doesn't exist for ef migrations bundle
- @stevendarby: Don't duplicate query filter parameters
Many thanks to all our contributors!
EF Core
- Query
- Remove most SQL parentheses for AND/OR
- Fixes around IncludeExpression for ExecuteUpdate/Delete
- IndexOutOfRangeException in CreateNavigationExpansionExpression(Expression sourceExpression, IEntityType entityType) / get_Chars(Int32 index) when EF class named "<>f__AnonymousType01Child" in 7.0.2 version
- Documentation
- JSON
- Dependencies
- Miscellaneous
- Model building
Builds to use
- The daily builds are the most up-to-date available.
- The daily builds now contain all issues merged for 7.0.x patch releases, as well as new code to be released in EF8 previews.
- The daily builds work on both .NET 6 and .NET 7.
- Preview: EF Core 8 Preview 2
- Preview releases lag behind the daily build. We recommend using the daily builds whenever possible.
- Current: EF Core 7.0.4
- LTS: EF Core 6.0.15
Releases
See GitHub Releases and EF Core releases and planning (Roadmap) in our documentation for full details.
Weekly/biweekly updates from previous years
Feedback
Comments are disabled on this issue to reduce noise. Please use the related discussion issue for any comments on these status updates.
April 13, 2023
Expand to see status from this week...
Highlights
EF Core 8 (EF8) Preview 3 is on NuGet now! No big features in this preview, but some nice smaller enhancements:
- Optimize update path for single property JSON element
- JSON columns can be used in compiled models
- Unneeded parentheses removed in SQL queries
- Set operations are supported over non-entity projections with different facets
EF Core 7.0.5 is also on NuGet now, with four important bug fixes.
Community Standup: Using hierarchical data in SQL Server and PostgreSQL with EF Core
In the latest .NET Data Community Standup, the .NET Data Access Team demonstrated mapping hierarchical data structures to relational databases using EF Core. This included using “hierarchyid” on SQL Server/Azure SQL and “ltree” on PostgresSQL, with demos using a family tree structure. EF Core is used to write LINQ queries against the hierarchy to find ancestors and descendants in various ways, as well as perform manipulation of subtrees for updates. And, as always, we answered questions from the live audience.
You can watch all .NET Data Community Standups on YouTube. We live-stream every other Wednesday to Twitch, YouTube, and Twitter. Comment on GitHub with ideas for guests, demos, or anything else you want to see.
EF Core 8 (EF8)
EF Core 8 (EF8) will be the next release after EF Core 7.0. It will be released alongside .NET 8 in November 2023.
The EF Core 8 Plan is available publicly in our documentation. As always, feedback is greatly appreciated. This plan is not set-in-stone; we expect it will evolve throughout the release cycle as we learn.
Each high-level area for EF Core 8 is linked in the table below together with its current high-level status.
Burndown for EF8
This is the burndown chart the team uses internally to track progress on EF Core 8.
- The upper chart shows work committed for EF8
- The lower chart shows work completed for EF8
- On each chart:
- Enhancements are in green and are shown at the bottom
- Bugs are in red and are stacked in the middle
- Other issues are in blue and stacked at the top
EF Core 8 Preview 3
EF Core 8 (EF8) Preview 3 is available from NuGet
Preview 3 contains the following new features:
- Optimize update path for single property JSON element
- JSON columns can be used in compiled models
- Unneeded parentheses removed in SQL queries
- Set operations are supported over non-entity projections with different facets
In addition, Preview 2 contains the following features from Previews 1 and 2:
- Json: add support for Sqlite provider
- SQL Server: Support hierarchyid
- Configuration to opt out of occasionally problematic SaveChanges optimizations
- Add convention types for triggers
- Translate element access of a JSON array
- Raw SQL queries for unmapped types
- Support the new BCL DateOnly and TimeOnly structs for SQL Server
- Translate ElementAt(OrDefault)
- Opt-out of lazy-loading for specific navigations
- Lazy-loading for no-tracking queries
- Reverse engineer Synapse and Dynamics 365 TDS
- Set MaxLength on TPH discriminator property by convention
- Translate ToString() on a string column
- Generic overload of ConventionSetBuilder.Remove
- Lookup tracked entities by primary key, alternate key, or foreign key
- Allow UseSequence and HiLo on non-key properties
- Pass query tracking behavior to materialization interceptor
- Use case-insensitive string key comparisons on SQL Server
- Allow value converters to change the DbType
- Resolve application services in EF services
- Numeric rowersion properties automatically convert to binary
- Allow transfer of ownership of DbConnection from application to DbContext
- Provide more information when 'No DbContext was found' error is generated
See GitHub for all issues resolved in Preview 1, Preview 2, and Preview 3.
EF Core 7.0.5
EF Core 7.0.5 is available on NuGet now. This is a patch release of EF Core 7 containing only important bug fixes:
- Can't add migration renaming a column on TPC root
- Scaffolded collection navigation properties do not have setters
- EF7 generating incorrect SQL for the Concat/Union All
- Added nullable property to Json mapped model resulting in errors instead of mapping non existing json property to null
EF Core 6.0.16
EF Core 6.0.16 is available on NuGet now. This is a patch release of EF Core 6 containing only updates to dependencies. There are no additional fixes in this release beyond those already shipped in EF Core 6.0.15.
Pull requests merged since the last update
Community contributions
- @Marusyk: Translate DateTimeOffset.ToUnixTime Seconds Milliseconds
- @dmihaita: Proposed fix for Optional RestartSequenceOperation.StartValue
- @walkindude: Fix a couple of typos in the relationships docs
- @walkindude: Touch-ups to the "relationships" documentation
- @ErikEJ: Add InterBase EF Core 6 provider
- @Kumima: Update foreign-and-principal-keys.md
- @Asaf-Malin: remove unnecessary )
- @NielsPilgaard: Update relationships.md
- @Kumima: Update one-to-one.md
- @alekson-sh: Fix typo in one-to-many.md
Many thanks to all our contributors!
EF Core
- JSON
- Documentation
- Dependencies
- Query
- Bulk updates
- Scaffolding
- SaveChanges
- Type mapping
Microsoft.Data.Sqlite
Builds to use
- The daily builds are the most up-to-date available.
- The daily builds now contain all issues merged for 7.0.x patch releases, as well as new code to be released in EF8 previews.
- The daily builds work on both .NET 6 and .NET 7.
- Preview: EF Core 8 Preview 3
- Preview releases lag behind the daily build. We recommend using the daily builds whenever possible.
- Current: EF Core 7.0.5
- LTS: EF Core 6.0.16
Releases
See GitHub Releases and EF Core releases and planning (Roadmap) in our documentation for full details.
Weekly/biweekly updates from previous years
Feedback
Comments are disabled on this issue to reduce noise. Please use the related discussion issue for any comments on these status updates.
April 27, 2023
Expand to see status from this week...
Highlights
Several features merged this week ready for EF8/.NET 8 preview 4:
Containsqueries are now parameterized in a way that doesn't pollute the database query cache. (#13617)- Collections of primitive values can be mapped and queried in JSON documents. (#29427)
- Primitive collections can be used in many other LINQ queries. (#30426)
- Microsoft.Data.Sqlite can now be trimmed for AOT with no warnings. (#29725)
For example, this LINQ query using Contains:
var ids = new[] { 7, 27, 345, 2, 90, 567 };
var users = await context.Users.Where(u => ids.Contains(u.Id)).ToListAsync();
is now translated to the following SQL on recent versions of SQL Server:
SELECT [u].[Id], [u].[Name]
FROM [Users] AS [u]
WHERE EXISTS (
SELECT 1
FROM OpenJson(@__ids_0) AS [i]
WHERE CAST([i].[value] AS int) = [u].[Id])
Where the parameter @__ids_0 is [7,27,345,2,90,567].
Community Standup: EF Core Internals – Model Building
In the latest .NET Data Community Standup, the .NET Data Access team digs into the EF Core internals for building a model. EF models are built using a combination of three mechanisms: conventions, mapping attributes, and the model builder API. We explain each of these mechanisms and show how they interact. We also cover how models are cached, and ways in which that caching can be controlled. And, as always, we answered your questions live!
You can watch all .NET Data Community Standups on YouTube. We live-stream every other Wednesday to Twitch, YouTube, and Twitter. Comment on GitHub with ideas for guests, demos, or anything else you want to see.
EF Core 8 (EF8)
EF Core 8 (EF8) will be the next release after EF Core 7.0. It will be released alongside .NET 8 in November 2023.
The EF Core 8 Plan is available publicly in our documentation. As always, feedback is greatly appreciated. This plan is not set-in-stone; we expect it will evolve throughout the release cycle as we learn.
Each high-level area for EF Core 8 is linked in the table below together with its current high-level status.
Burndown for EF8
This is the burndown chart the team uses internally to track progress on EF Core 8.
- The upper chart shows work committed for EF8
- The lower chart shows work completed for EF8
- On each chart:
- Enhancements are in green and are shown at the bottom
- Bugs are in red and are stacked in the middle
- Other issues are in blue and stacked at the top
EF Core 8 Preview 3
EF Core 8 (EF8) Preview 3 is available from NuGet
Preview 3 contains the following new features:
- Optimize update path for single property JSON element
- JSON columns can be used in compiled models
- Unneeded parentheses removed in SQL queries
- Set operations are supported over non-entity projections with different facets
In addition, Preview 2 contains the following features from Previews 1 and 2:
- Json: add support for Sqlite provider
- SQL Server: Support hierarchyid
- Configuration to opt out of occasionally problematic SaveChanges optimizations
- Add convention types for triggers
- Translate element access of a JSON array
- Raw SQL queries for unmapped types
- Support the new BCL DateOnly and TimeOnly structs for SQL Server
- Translate ElementAt(OrDefault)
- Opt-out of lazy-loading for specific navigations
- Lazy-loading for no-tracking queries
- Reverse engineer Synapse and Dynamics 365 TDS
- Set MaxLength on TPH discriminator property by convention
- Translate ToString() on a string column
- Generic overload of ConventionSetBuilder.Remove
- Lookup tracked entities by primary key, alternate key, or foreign key
- Allow UseSequence and HiLo on non-key properties
- Pass query tracking behavior to materialization interceptor
- Use case-insensitive string key comparisons on SQL Server
- Allow value converters to change the DbType
- Resolve application services in EF services
- Numeric rowersion properties automatically convert to binary
- Allow transfer of ownership of DbConnection from application to DbContext
- Provide more information when 'No DbContext was found' error is generated
See GitHub for all issues resolved in Preview 1, Preview 2, and Preview 3.
EF Core 7.0.5
EF Core 7.0.5 is available on NuGet now. This is a patch release of EF Core 7 containing only important bug fixes:
- Can't add migration renaming a column on TPC root
- Scaffolded collection navigation properties do not have setters
- EF7 generating incorrect SQL for the Concat/Union All
- Added nullable property to Json mapped model resulting in errors instead of mapping non existing json property to null
EF Core 6.0.16
EF Core 6.0.16 is available on NuGet now. This is a patch release of EF Core 6 containing only updates to dependencies. There are no additional fixes in this release beyond those already shipped in EF Core 6.0.15.
Pull requests merged since the last update
Community contributions
- @NKnusperer: Make SequentialGuidValueGenerator non-allocating
- @stevendarby: Allow changing an open connection if it's not owned
- @stevendarby: Allow DI for pooled DbContexts
- @OsamaAbuSitta: Add Generic version of EntityTypeConfiguration Attribute
- @DoctorKrolic: Refactor internal usage analyzer
- @aeri: fix: typo in Optional one-to-one
- @eluchsinger: Complete the sample with the typed discriminator mapping
Many thanks to all our contributors!
EF Core
- Query
- Fix for converter from bool used in predicate without comparison fails on sqlite (and other non-sql server backends?)
- Fix for GroupBy generates invalid SQL when using custom database function
- Stop pushing down to subquery for non-Concat set operations without limit/offset
- Tiny cleanup of CloningExpressionVisitor
- Support primitive collections
- Add some VB.NET tests
- Fix for multiple LeftJoins (GroupJoins) lead to GroupJoin Exception when the same where is used twice
- JSON
- Documentation
Microsoft.Data.Sqlite
Builds to use
- The daily builds are the most up-to-date available.
- The daily builds now contain all issues merged for 7.0.x patch releases, as well as new code to be released in EF8 previews.
- The daily builds work on both .NET 6 and .NET 7.
- Preview: EF Core 8 Preview 3
- Preview releases lag behind the daily build. We recommend using the daily builds whenever possible.
- Current: EF Core 7.0.5
- LTS: EF Core 6.0.16
Releases
See GitHub Releases and EF Core releases and planning (Roadmap) in our documentation for full details.
Weekly/biweekly updates from previous years
Feedback
Comments are disabled on this issue to reduce noise. Please use the related discussion issue for any comments on these status updates.
May 11, 2023
Expand to see status from this week...
Highlights
Merged this week: massively improved data type detection when scaffolding a DbContext and entity types from a SQLite database. SQLite databases have very limited (and strange) support for the type of data stored in a column. In addition to using column metadata, EF Core now samples data in the column to determine which .NET type to use. This means columns with date/time types, GUIDs, booleans, etc. are correctly detected and entity types are scaffolded with appropriate property types.
Community Standup: Azure SQL Database and SQL Server 2022 - What’s new for developers
In the latest .NET Data Community Standup, Silvano Coriani joins the .NET Data Access team to discuss some of the new capabilities introduced on both SQL Server and our Azure services that have an impact on app development. This includes:
- T-SQL and IQP enhancements
- Local Development Experience
- JSON enhancements
You can watch all .NET Data Community Standups on YouTube. We live-stream every other Wednesday to Twitch, YouTube, and Twitter. Comment on GitHub with ideas for guests, demos, or anything else you want to see.
EF Core 8 (EF8)
EF Core 8 (EF8) will be the next release after EF Core 7.0. It will be released alongside .NET 8 in November 2023.
The EF Core 8 Plan is available publicly in our documentation. As always, feedback is greatly appreciated. This plan is not set-in-stone; we expect it will evolve throughout the release cycle as we learn.
Each high-level area for EF Core 8 is linked in the table below together with its current high-level status.
Burndown for EF8
This is the burndown chart the team uses internally to track progress on EF Core 8.
- The upper chart shows work committed for EF8
- The lower chart shows work completed for EF8
- On each chart:
- Enhancements are in green and are shown at the bottom
- Bugs are in red and are stacked in the middle
- Other issues are in blue and stacked at the top
EF Core 8 Preview 3
EF Core 8 (EF8) Preview 3 is available from NuGet
Preview 3 contains the following new features:
- Optimize update path for single property JSON element
- JSON columns can be used in compiled models
- Unneeded parentheses removed in SQL queries
- Set operations are supported over non-entity projections with different facets
In addition, Preview 2 contains the following features from Previews 1 and 2:
- Json: add support for Sqlite provider
- SQL Server: Support hierarchyid
- Configuration to opt out of occasionally problematic SaveChanges optimizations
- Add convention types for triggers
- Translate element access of a JSON array
- Raw SQL queries for unmapped types
- Support the new BCL DateOnly and TimeOnly structs for SQL Server
- Translate ElementAt(OrDefault)
- Opt-out of lazy-loading for specific navigations
- Lazy-loading for no-tracking queries
- Reverse engineer Synapse and Dynamics 365 TDS
- Set MaxLength on TPH discriminator property by convention
- Translate ToString() on a string column
- Generic overload of ConventionSetBuilder.Remove
- Lookup tracked entities by primary key, alternate key, or foreign key
- Allow UseSequence and HiLo on non-key properties
- Pass query tracking behavior to materialization interceptor
- Use case-insensitive string key comparisons on SQL Server
- Allow value converters to change the DbType
- Resolve application services in EF services
- Numeric rowersion properties automatically convert to binary
- Allow transfer of ownership of DbConnection from application to DbContext
- Provide more information when 'No DbContext was found' error is generated
See GitHub for all issues resolved in Preview 1, Preview 2, and Preview 3.
EF Core 7.0.5
EF Core 7.0.5 is available on NuGet now. This is a patch release of EF Core 7 containing only important bug fixes:
- Can't add migration renaming a column on TPC root
- Scaffolded collection navigation properties do not have setters
- EF7 generating incorrect SQL for the Concat/Union All
- Added nullable property to Json mapped model resulting in errors instead of mapping non existing json property to null
EF Core 6.0.16
EF Core 6.0.16 is available on NuGet now. This is a patch release of EF Core 6 containing only updates to dependencies. There are no additional fixes in this release beyond those already shipped in EF Core 6.0.15.
Pull requests merged since the last update
Community contributions
- @DoctorKrolic: Refactor analyzers' test infrastructure
- @ofthelit: Update many-to-many.md
Many thanks to all our contributors!
EF Core
- Query
- (Preview 4) Support primitive collections
- Use JsonScalarExpression for primitive collection indexing
- Improve collection indexer normalization
- (7.0.7) Fix multiple LeftJoins (GroupJoins) lead to GroupJoin Exception when the same where is used twice
- (7.0.7) fixing a typo in quirk string for issue 30330
- (7.0.7) Re-introduce quirk with typo
- Disable VB tests
- Documentation
- Dependencies
- Model building
- Change tracking
- Scaffolding
Builds to use
- The daily builds are the most up-to-date available.
- The daily builds now contain all issues merged for 7.0.x patch releases, as well as new code to be released in EF8 previews.
- The daily builds work on both .NET 6 and .NET 7.
- Preview: EF Core 8 Preview 3
- Preview releases lag behind the daily build. We recommend using the daily builds whenever possible.
- Current: EF Core 7.0.5
- LTS: EF Core 6.0.16
Releases
See GitHub Releases and EF Core releases and planning (Roadmap) in our documentation for full details.
Weekly/biweekly updates from previous years
Feedback
Comments are disabled on this issue to reduce noise. Please use the related discussion issue for any comments on these status updates.
May 25, 2023
Expand to see status from this week...
Highlights
EF Core 8 Preview 4 is on NuGet now!
- Blog post: Primitive collections and improved Contains
- Detailed "What's New" documentation, including runnable samples: aka.ms/ef8-new
Here's an example of a query that can now be translated using the new support for primitive collections. This query will tell us how common it is for a dog walk to coincide with a visit to the nearest pub:
Which translates to the following on SQL Server:
See the What's New documentation and blog post for more examples.
Community Standup: Collections of primitive values in EF Core
In the latest .NET Data Community Standup, the .NET Data Access team dive into new support for collections of primitive values, just released in EF Core 8 Preview 4. Collections of a primitive type can now be used as properties of an entity type and will be mapped to a JSON column in the relational database. In addition, parameters of primitive values can be passed to the database. In either case, the native JSON processing capabilities of the database are then used to exact and manipulate the primitive values, just as if they were in a table. This opens up powerful query possibilities, as well as optimizations to common problems such as translating queries that use Contains.
You can watch all .NET Data Community Standups on YouTube. We live-stream every other Wednesday to Twitch, YouTube, and Twitter. Comment on GitHub with ideas for guests, demos, or anything else you want to see.
EF Core 8 (EF8)
EF Core 8 (EF8) will be the next release after EF Core 7.0. It will be released alongside .NET 8 in November 2023.
The EF Core 8 Plan is available publicly in our documentation. As always, feedback is greatly appreciated. This plan is not set-in-stone; we expect it will evolve throughout the release cycle as we learn.
Each high-level area for EF Core 8 is linked in the table below together with its current high-level status.
Burndown for EF8
This is the burndown chart the team uses internally to track progress on EF Core 8.
- The upper chart shows work committed for EF8
- The lower chart shows work completed for EF8
- On each chart:
- Enhancements are in green and are shown at the bottom
- Bugs are in red and are stacked in the middle
- Other issues are in blue and stacked at the top
EF Core 8 Preview 4
EF Core 8 (EF8) Preview 4 is available from NuGet
Preview 4 contains the following new features:
- IN() list queries are not parameterized, causing increased SQL Server CPU usage
- Allow 'unsharing' connection between contexts
- Remove unneeded subquery and projection when using ordering without limit/offset in set operations
- Make SequentialGuidValueGenerator non-allocating
- Support querying over primitive collections
- JSON/Sqlite: use -> and ->> where possible when traversing JSON, rather than json_extract
- Add Generic version of EntityTypeConfiguration Attribute
- NativeAOT/trimming compatibility for Microsoft.Data.Sqlite
- Map collections of primitive types to JSON column in relational database
- Translate DateTimeOffset.ToUnixTime(Seconds|Milliseconds)
- Allow pooling DbContext with singleton services
- Optional RestartSequenceOperation.StartValue
- Generate compiled relational model
- Global query filters produce too many parameters
In addition, Preview 2 contains the following features from Previews 1, 2, and 3:
- Optimize update path for single property JSON element
- JSON columns can be used in compiled models
- Unneeded parentheses removed in SQL queries
- Set operations are supported over non-entity projections with different facets
- Json: add support for Sqlite provider
- SQL Server: Support hierarchyid
- Configuration to opt out of occasionally problematic SaveChanges optimizations
- Add convention types for triggers
- Translate element access of a JSON array
- Raw SQL queries for unmapped types
- Support the new BCL DateOnly and TimeOnly structs for SQL Server
- Translate ElementAt(OrDefault)
- Opt-out of lazy-loading for specific navigations
- Lazy-loading for no-tracking queries
- Reverse engineer Synapse and Dynamics 365 TDS
- Set MaxLength on TPH discriminator property by convention
- Translate ToString() on a string column
- Generic overload of ConventionSetBuilder.Remove
- Lookup tracked entities by primary key, alternate key, or foreign key
- Allow UseSequence and HiLo on non-key properties
- Pass query tracking behavior to materialization interceptor
- Use case-insensitive string key comparisons on SQL Server
- Allow value converters to change the DbType
- Resolve application services in EF services
- Numeric rowersion properties automatically convert to binary
- Allow transfer of ownership of DbConnection from application to DbContext
- Provide more information when 'No DbContext was found' error is generated
See GitHub for all issues resolved in Preview 1, Preview 2, Preview 3, and Preview 4.
EF Core 7.0.5
EF Core 7.0.5 is available on NuGet now. This is a patch release of EF Core 7 containing only important bug fixes:
- Can't add migration renaming a column on TPC root
- Scaffolded collection navigation properties do not have setters
- EF7 generating incorrect SQL for the Concat/Union All
- Added nullable property to Json mapped model resulting in errors instead of mapping non existing json property to null
EF Core 6.0.16
EF Core 6.0.16 is available on NuGet now. This is a patch release of EF Core 6 containing only updates to dependencies. There are no additional fixes in this release beyond those already shipped in EF Core 6.0.15.
Pull requests merged since the last update
Community contributions
- @DoctorKrolic: Add analyzer/codefix for usage of interpolated strings in raw query methods
- @F2: Fixed misspelling of Friends
Many thanks to all our contributors!
EF Core
- Query
- Documentation
- Dependencies
- Model building
- Type mapping
- Change tracking
- Scaffolding
Builds to use
- The daily builds are the most up-to-date available.
- The daily builds now contain all issues merged for 7.0.x patch releases, as well as new code to be released in EF8 previews.
- The daily builds work on both .NET 6 and .NET 7.
- Preview: EF Core 8 Preview 4
- Preview releases lag behind the daily build. We recommend using the daily builds whenever possible.
- Current: EF Core 7.0.5
- LTS: EF Core 6.0.16
Releases
See GitHub Releases and EF Core releases and planning (Roadmap) in our documentation for full details.
Weekly/biweekly updates from previous years
Feedback
Comments are disabled on this issue to reduce noise. Please use the related discussion issue for any comments on these status updates.
June 22, 2023
Expand to see status from this week...
Highlights
EF Core 8 Preview 5 is on NuGet now!
Preview 5 contains the following new features:
- SQLite RevEng: Sample data to determine CLR type
- Allow default value check in value generation to be customized
- Update handling of non-nullable store-generated properties
Community Standup: Synchronizing data between the cloud and the client
In the latest .NET Data Community Standup, we talke to Erik Sink about a solution for keeping a synchronized copy of the DB (using SQLite) on the client, rather than asking data for the cloud every time. This is helpful for mobile scenarios where the connectivity may be poor, but the "rep and sync" approach can reduce the time the user spends waiting on the network. Local writes are fast, sync happens in the background. We explore how this is done efficiently, how to deal with conflict resolution, and other data sync-related concerns.
Community Standup: New CLI edition of EF Core Power Tools
In a recent .NET Data Community Standup, ErikEJ demonstrates the new CLI edition of EF Core Power Tools and shows how he used a number of community NuGet packages to improve the user experience when creating a CLI tool.
You can watch all .NET Data Community Standups on YouTube. We live-stream every other Wednesday to Twitch, YouTube, and Twitter. Comment on GitHub with ideas for guests, demos, or anything else you want to see.
EF Core 8 (EF8)
EF Core 8 (EF8) will be the next release after EF Core 7.0. It will be released alongside .NET 8 in November 2023.
The EF Core 8 Plan is available publicly in our documentation. As always, feedback is greatly appreciated. This plan is not set-in-stone; we expect it will evolve throughout the release cycle as we learn.
Each high-level area for EF Core 8 is linked in the table below together with its current high-level status.
Burndown for EF8
This is the burndown chart the team uses internally to track progress on EF Core 8.
- The upper chart shows work committed for EF8
- The lower chart shows work completed for EF8
- On each chart:
- Enhancements are in green and are shown at the bottom
- Bugs are in red and are stacked in the middle
- Other issues are in blue and stacked at the top
EF Core 8 Preview 5
EF Core 8 (EF8) Preview 5 is available from NuGet
Preview 5 contains the following new features:
- SQLite RevEng: Sample data to determine CLR type
- Allow default value check in value generation to be customized
- Update handling of non-nullable store-generated properties
In addition, Preview 2 contains the following features from Previews 1, 2, 3, and 4:
- IN() list queries are not parameterized, causing increased SQL Server CPU usage
- Allow 'unsharing' connection between contexts
- Remove unneeded subquery and projection when using ordering without limit/offset in set operations
- Make SequentialGuidValueGenerator non-allocating
- Support querying over primitive collections
- JSON/Sqlite: use -> and ->> where possible when traversing JSON, rather than json_extract
- Add Generic version of EntityTypeConfiguration Attribute
- NativeAOT/trimming compatibility for Microsoft.Data.Sqlite
- Map collections of primitive types to JSON column in relational database
- Translate DateTimeOffset.ToUnixTime(Seconds|Milliseconds)
- Allow pooling DbContext with singleton services
- Optional RestartSequenceOperation.StartValue
- Generate compiled relational model
- Global query filters produce too many parameters
- Optimize update path for single property JSON element
- JSON columns can be used in compiled models
- Unneeded parentheses removed in SQL queries
- Set operations are supported over non-entity projections with different facets
- Json: add support for Sqlite provider
- SQL Server: Support hierarchyid
- Configuration to opt out of occasionally problematic SaveChanges optimizations
- Add convention types for triggers
- Translate element access of a JSON array
- Raw SQL queries for unmapped types
- Support the new BCL DateOnly and TimeOnly structs for SQL Server
- Translate ElementAt(OrDefault)
- Opt-out of lazy-loading for specific navigations
- Lazy-loading for no-tracking queries
- Reverse engineer Synapse and Dynamics 365 TDS
- Set MaxLength on TPH discriminator property by convention
- Translate ToString() on a string column
- Generic overload of ConventionSetBuilder.Remove
- Lookup tracked entities by primary key, alternate key, or foreign key
- Allow UseSequence and HiLo on non-key properties
- Pass query tracking behavior to materialization interceptor
- Use case-insensitive string key comparisons on SQL Server
- Allow value converters to change the DbType
- Resolve application services in EF services
- Numeric rowersion properties automatically convert to binary
- Allow transfer of ownership of DbConnection from application to DbContext
- Provide more information when 'No DbContext was found' error is generated
See GitHub for all issues resolved in Preview 1, Preview 2, Preview 3, Preview 4, and Preview 5.
EF Core 7.0.8
EF Core 7.0.8 is available on NuGet now.
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.7.
EF Core 7.0.7 was also release since the last new update. It contains the following important bug fixes:
- IndexOutOfRangeException in CreateNavigationExpansionExpression
- Linq select cannot project an entity containing both Json columns and ICollections
- Json: updating property with conversion from string to other type fails on sql server
- Duplicate table alias in generated select query (An item with the same key has already been added)
- InvalidOperationException when calling ExecuteUpdate with owned entity & using current value
- Query/Json: projecting entity collection along with json collection generates invalid shaper
- AutoInclude causes ExecuteDelete to fail
- Multiple LeftJoins (GroupJoins) lead to GroupJoin Exception when the same where is used twice
- SaveChanges circular dependency in unique unfiltered index (when change doesn't affect any column from unique index).
EF Core 6.0.19
EF Core 6.0.19 is available on NuGet now. This is a patch release of EF Core 6 containing only updates to dependencies. There are no additional fixes in this release beyond those already shipped in EF Core 6.0.16.
Pull requests merged since the last update
Community contributions
- @memory-thrasher: Fixes scaffolding on Synapse (triggers)
- @Varorbc: Remove implicitly dependent reference
- @ErikEJ: Make EngineEdition more readable
- @beliakov-mb: Fix navigation in UserDefinedFunction
- @Propo41: Fixed typo
- @n0099: Update samples/core/Saving/Transactions/SharingTransaction.cs
- @jefnic23: Update concurrency.md
- @ascott18: Clarify interation between MARS and Savepoints
- @Suchiman: Add EFC7 DbSet NRT suppression information
Many thanks to all our contributors!
EF Core
- Query
- Update exception message for Cosmos subquery pushdown
- Normalize Any to Contains instead of vice versa
- Translate to IN + subquery when possible instead of EXISTS
- Better management of negated expressions
- Use raw literal strings goodness
- Generate OPENJSON with WITH unless ordering is required
- Better translation of predicate-less Any over JSON
- Introduce Visit for
IReadOnlyList<T> - Support any expression type inside inline primitive collections
- Uncomment test output helpers everywhere
- Partial fix to type mapping inference for primitive collections
- Documentation
- Miscellaneous:
- Dependencies
- Type mapping
- Change tracking
- Scaffolding
- SQLite:
Builds to use
- The daily builds are the most up-to-date available.
- The daily builds now contain all issues merged for 7.0.x patch releases, as well as new code to be released in EF8 previews.
- The daily builds work on both .NET 6 and .NET 7.
- Preview: EF Core 8 Preview 5
- Preview releases lag behind the daily build. We recommend using the daily builds whenever possible.
- Current: EF Core 7.0.8
- LTS: EF Core 6.0.19
Releases
See GitHub Releases and EF Core releases and planning (Roadmap) in our documentation for full details.
Weekly/biweekly updates from previous years
Feedback
Comments are disabled on this issue to reduce noise. Please use the related discussion issue for any comments on these status updates.