Skip to content

Fix anti-pattern false positives on keyless AllData and EF's reload query - #1100

Merged
SimonCropp merged 1 commit into
mainfrom
fix-keyless-and-reload-false-positives
Oct 1, 2026
Merged

SimonCropp merged 1 commit into
mainfrom
fix-keyless-and-reload-false-positives

Conversation

@SimonCropp

Copy link
Copy Markdown
Member
  • AllData no longer applies AsNoTracking to keyless entity types, which EF never tracks, so it threw under ThrowOnAntiPatterns on any model with a keyless view.
  • Queries EF builds itself for EntityEntry.Reload and GetDatabaseValues (AsNoTracking().IgnoreQueryFilters().Where(key).Select(object[])) are no longer checked, since the code under test can not change them. IgnoredQueryFiltersDetector threw on them for entity types without a query filter.

…uery

- AllData no longer applies AsNoTracking to keyless entity types, which EF never tracks, so it threw under ThrowOnAntiPatterns on any model with a keyless view.
- Queries EF builds itself for EntityEntry.Reload and GetDatabaseValues (AsNoTracking().IgnoreQueryFilters().Where(key).Select(object[])) are no longer checked, since the code under test can not change them. IgnoredQueryFiltersDetector threw on them for entity types without a query filter.
@SimonCropp
SimonCropp merged commit 45423e8 into main Oct 1, 2026
5 checks passed
@SimonCropp
SimonCropp deleted the fix-keyless-and-reload-false-positives branch October 1, 2026 23:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant