All notable changes to EFQueryGuard will be documented in this file.
-
N+1 Query Detection (EFQ001) — Warns when navigation properties are accessed inside
foreachloops without a correspondingInclude()call, catching the most common EF Core performance trap before it hits production. -
Missing AsNoTracking Detection (EFQ002) — Flags read-only queries that don't use
AsNoTracking()orAsNoTrackingWithIdentityResolution(). Automatically suppresses whenSaveChanges()is present in the same method. -
Unbounded Query Detection (EFQ003) — Catches
ToList()andToArray()calls on entire tables withoutTake()or pagination, preventing accidental full-table loads. -
Cartesian Explosion Detection (EFQ004) — Warns when two or more
Include()calls are chained withoutAsSplitQuery(), which can cause query result sets to explode in size. -
Sync-over-Async Detection (EFQ005) — Detects synchronous methods like
ToList()andFirstOrDefault()called on database queries insideasyncmethods, suggesting the async equivalent. -
Client Evaluation Detection (EFQ006) — Identifies custom method calls inside
Where()andSelect()expressions that EF Core cannot translate to SQL, which silently pull data to the client for filtering. -
Zero-config NuGet installation — Just
dotnet add package EFQueryGuardand diagnostics appear automatically during build. No configuration required. -
Configurable via .editorconfig — Every rule can be tuned or disabled per-project using standard
.editorconfigseverity settings.
- Sync-over-async analyzer no longer false-positives on synchronous calls inside sync lambdas that happen to be nested within async methods.