-
Notifications
You must be signed in to change notification settings - Fork 2k
Breaking change note for Cosmos sync I/O removal #5153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
45 changes: 45 additions & 0 deletions
45
entity-framework/core/what-is-new/ef-core-11.0/breaking-changes.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| --- | ||
| title: Breaking changes in EF Core 11 (EF11) - EF Core | ||
| description: List of breaking changes introduced in Entity Framework Core 11 (EF11) | ||
| author: roji | ||
| ms.date: 11/09/2025 | ||
| uid: core/what-is-new/ef-core-11.0/breaking-changes | ||
| --- | ||
|
|
||
| # Breaking changes in EF Core 11 (EF11) | ||
|
|
||
| This page documents API and behavior changes that have the potential to break existing applications updating from EF Core 10 to EF Core 11. Make sure to review earlier breaking changes if updating from an earlier version of EF Core: | ||
|
|
||
| - [Breaking changes in EF Core 10](xref:core/what-is-new/ef-core-10.0/breaking-changes) | ||
| - [Breaking changes in EF Core 9](xref:core/what-is-new/ef-core-9.0/breaking-changes) | ||
| - [Breaking changes in EF Core 8](xref:core/what-is-new/ef-core-8.0/breaking-changes) | ||
|
|
||
| ## Summary | ||
|
|
||
| | **Breaking change** | **Impact** | | ||
| |:--------------------------------------------------------------------------------------------------------------- | -----------| | ||
| | [Sync I/O via the Azure Cosmos DB provider has been fully removed](#cosmos-nosync) | Medium | | ||
|
|
||
| ### Medium-impact changes | ||
|
|
||
| <a name="cosmos-nosync"></a> | ||
|
|
||
| #### Sync I/O via the Azure Cosmos DB provider has been fully removed | ||
|
|
||
| [Tracking Issue #37059](https://github.com/dotnet/efcore/issues/37059) | ||
|
|
||
| ##### Old behavior | ||
|
|
||
| Synchronous I/O via the Azure Cosmos DB provider has been unsupported since EF 9.0 ([note](/ef/core/what-is-new/ef-core-9.0/breaking-changes#cosmos-nosync)); calling any sync I/O API - like `ToList` or `SaveChanges` threw an exception, unless a special opt-in was configured. When the opt-in was configured, sync I/O APIs worked as before, causing the provider to perform "sync-over-async" blocking against the Azure Cosmos DB SDK, which could result in deadlocks and other performance issues. | ||
|
|
||
| ##### New behavior | ||
|
|
||
| Starting with EF Core 11.0, EF now always throws when a synchronous I/O API is called. There is no way to opt back into using sync I/O APIs. | ||
|
|
||
| ##### Why | ||
|
|
||
| Synchronous blocking on asynchronous methods ("sync-over-async") is highly discouraged, and can lead to deadlock and other performance problems. Since the Azure Cosmos DB SDK only supports async methods, so does the EF Cosmos provider. | ||
|
|
||
| ##### Mitigations | ||
|
|
||
| Convert your code to use async I/O APIs instead of sync I/O ones. For example, replace calls to `SaveChanges()` with `await SaveChangesAsync()`. | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.