Skip to content

refactor(SyncCache): simplify ResetAsync method#750

Merged
MayueCif merged 1 commit intomainfrom
feat/remove_method
Jun 24, 2025
Merged

refactor(SyncCache): simplify ResetAsync method#750
MayueCif merged 1 commit intomainfrom
feat/remove_method

Conversation

@MayueCif
Copy link
Contributor

Replaced the ClientQueryAsync method with ClientQuery().ToListAsync() in the ResetAsync implementation. The ClientQueryAsync method and its internal logic have been removed, streamlining the asynchronous query process and improving code readability and maintainability.

Replaced the `ClientQueryAsync` method with `ClientQuery().ToListAsync()` in the `ResetAsync` implementation. The `ClientQueryAsync` method and its internal logic have been removed, streamlining the asynchronous query process and improving code readability and maintainability.
@wzh425 wzh425 requested a review from Copilot June 24, 2025 02:51
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the ResetAsync method in the SyncCache class to simplify the asynchronous query process by replacing the ClientQueryAsync method with a more streamlined call using ClientQuery().ToListAsync().

  • Replaces the ClientQueryAsync call in ResetAsync with ClientQuery().ToListAsync()
  • Removes the obsolete ClientQueryAsync method and its internal aggregation logic
Comments suppressed due to low confidence (1)

src/Contrib/Authentication/OpenIdConnect/Masa.Contrib.Authentication.OpenIdConnect.EFCore/Caches/SyncCache.cs:96

  • Verify that the new ClientQuery method correctly includes all required navigation properties and related data that were previously populated in the removed ClientQueryAsync method.
            var clients = await ClientQuery().ToListAsync();

@MayueCif MayueCif merged commit c6f3810 into main Jun 24, 2025
1 check passed
@MayueCif MayueCif deleted the feat/remove_method branch June 24, 2025 02:55
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
D Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

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.

3 participants