Skip to content
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

IdentityService.cs - use FindByIdAsync #1109

Merged
merged 1 commit into from
Mar 3, 2024

Conversation

AkosLukacs
Copy link
Contributor

Changing to FindByIdAsync means EF doesn't send the same database query over and over when querying the same user's information in the same request. For SQL UserStore at least: https://github.com/dotnet/aspnetcore/blob/5c17b92560953e86f1ea8502a567bcb3a1be4a2f/src/Identity/EntityFrameworkCore/src/UserStore.cs#L219

Improves #1046, see my comment there.

Changing to FindByIdAsync means EF doesn't send the same database query over and over when querying the same user's information in the same request.
For SQL UserStore at least: https://github.com/dotnet/aspnetcore/blob/5c17b92560953e86f1ea8502a567bcb3a1be4a2f/src/Identity/EntityFrameworkCore/src/UserStore.cs#L219
@jasontaylordev jasontaylordev merged commit 022ffc7 into jasontaylordev:main Mar 3, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants