Skip to content

React to the breaking change affecting EF Core's NavigationEntry.LoadAsync() API in 8.0 #1789

Description

@kevinchalet

Confirm you've already contributed to this project or that you sponsor it

  • I confirm I'm a sponsor or a contributor

Version

4.x

Describe the bug

As reported here, EF Core 8.0's latest preview comes with a source and binary change affecting the NavigationEntry.LoadAsync() API (that now takes an optional LoadOptions parameter) and breaking the OpenIddict EF Core stores.

This API is used in a few places in the EF Core stores. E.g:

// If the application is not attached to the authorization, try to load it manually.
if (authorization.Application is null)
{
var reference = Context.Entry(authorization).Reference(entry => entry.Application);
if (reference.EntityEntry.State is EntityState.Detached)
{
return null;
}
await reference.LoadAsync(cancellationToken);
}

The "source-breaking" aspect of this change isn't a big deal, but the fact it's "binary-breaking" is much more annoying, as it will prevent using the OpenIddict 4.x EF Core stores with EF Core 8.0.

We'll need to either rely on reflection or add a net8.0 TFM to fix this issue.

To reproduce

Reference the latest EF Core 8.0 preview in an OpenIddict 4.4 app.

Exceptions (if any)

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions