Skip to content

Fix compatibility issue with ef 8 - #1786

Closed
ismayil-musayev wants to merge 1 commit into
openiddict:devfrom
ismayil-musayev:dev
Closed

Fix compatibility issue with ef 8#1786
ismayil-musayev wants to merge 1 commit into
openiddict:devfrom
ismayil-musayev:dev

Conversation

@ismayil-musayev

Copy link
Copy Markdown

In ef 8 preview a new parameter has been added to the LoadAsync method
This pr fixes this compatibility issue

@kevinchalet

Copy link
Copy Markdown
Member

Thanks for your PR.

Unfortunately, this won't fix the issue you're seeing. For that, we'll need to compile against EF Core 8.0 for the compiler to target the new LoadAsync() signature taking a LoadOptions parameter, which is a much bigger fix that requires targeting .NET 8.0 and referencing the EF Core 8.0 packages.

I opened #1789 to track that and informed the EF team this breaking change is not documented: dotnet/efcore#30306 (comment).

@kevinchalet kevinchalet closed this Jun 5, 2023
@ismayil-musayev

Copy link
Copy Markdown
Author

My fault.

Will you accept pr if I change this line
await reference.LoadAsync(cancellationToken)
to this
await reference.Query().ToListAsync(cancellationToken);
as a workaround?

It will send the exact same query to a database.

@ismayil-musayev

Copy link
Copy Markdown
Author

@kevinchalet any comments regarding new approach?

@kevinchalet

Copy link
Copy Markdown
Member

It's likely a good workaround (thanks!), but I'd like to hear back from the EF folks before changing anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants