Skip to content

Add documentation for breaking change. #4738

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 1 commit into from
Jun 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 27 additions & 4 deletions entity-framework/core/what-is-new/ef-core-9.0/breaking-changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ EF Core 9 targets .NET 8. This means that existing applications that target .NET

## Summary

| **Breaking change** | **Impact** |
|:-----------------------------------------------------------------------------------|------------|
| [Sync I/O via the Azure Cosmos DB provider is no longer supported](#cosmos-nosync) | Medium |
| [EF.Functions.Unhex() now returns `byte[]?`](#unhex) | Low |
| **Breaking change** | **Impact** |
|:-----------------------------------------------------------------------------------------------------|------------|
| [Sync I/O via the Azure Cosmos DB provider is no longer supported](#cosmos-nosync) | Medium |
| [EF.Functions.Unhex() now returns `byte[]?`](#unhex) | Low |
| [SqlFunctionExpression's nullability arguments' arity validated](#sqlfunctionexpression-nullability) | Low |

## Medium-impact changes

Expand Down Expand Up @@ -87,3 +88,25 @@ var binaryData = await context.Blogs.Select(b => EF.Functions.Unhex(b.HexString)
```

Otherwise, add runtime checks for null on the return value of Unhex().

<a name="sqlfunctionexpression-nullability"></a>

### SqlFunctionExpression's nullability arguments' arity validated

[Tracking Issue #33852](https://github.com/dotnet/efcore/issues/33852)

#### Old behavior

Previously it was possible to create a `SqlFunctionExpression` with a different number of arguments and nullability propagation arguments.

#### New behavior

Starting with EF Core 9.0, EF now throws if the number of arguments and nullability propagation arguments do not match.

#### Why

Not having matching number of arguments and nullability propagation arguments can lead to unexpected behavior.

#### Mitigations

Make sure the `argumentsPropagateNullability` has same number of elements as the `arguments`. When in doubt use `false` for nullability argument.
Loading