← ClaudeAtlas

efcore-reviewlisted

Review EF Core data access for slow or wrong queries: N+1, filtering after ToList, SaveChanges in loops, Include row explosion, predicates that defeat an index, deep Skip/Take paging, unstable ordering, wrong tracking, ExecuteUpdate skipping concurrency, overlapping DbContext calls, concatenated raw SQL, missing indexes. Separates what the code proves from what needs a query plan; reports first. Use when an endpoint or job on EF Core is slow or runs too many queries, or a query or model change is about to merge ("query chậm", "N+1", "review EF", "tối ưu query"). Not for Dapper or raw ADO.NET, or a live database's metrics (see mgi-kit:azure-diagnose).
viettdann/arclight-kit · ★ 0 · Code & Development · score 65
Install: claude install-skill viettdann/arclight-kit
# EF Core review Find the data-access defects that cost round-trips, rows, scans, or correctness, and say how sure each one is. Source alone proves what the code does; it doesn't prove what the database does. Every finding is labeled with which of the two it rests on. ## Scope - **After a change** (default when the working tree or branch has changes): the queries, repositories, and model configuration the diff touches, plus the callers of a touched repository method. Diff with `git diff HEAD` or `git diff <base>...HEAD`. - **A named target**: the file, folder, endpoint, or job the user named, followed down to the `DbContext`. - **Whole data layer**: only when asked. Find the EF boundary yourself: the `DbContext`, `DbSet` properties, repository implementations, `IEntityTypeConfiguration` classes, `OnModelCreating`, and the migrations folder. Don't ask for paths that are in the repo. Read the provider (`UseSqlServer`, `UseAzureSql`, `UseNpgsql`, `UseSqlite`) and the EF Core version from the package reference; several rules below depend on both. ## Process 1. **Trace each query to where it executes.** Follow repository and helper methods into their implementation, not their interface name. Note the static type at each step: operators on `IQueryable<T>` run in SQL; once a value is a `List<T>`, array, or `IEnumerable<T>` produced by `AsEnumerable()` or a materializing call, every later `Where`, `Select`, `Count`, `OrderBy` runs in memory on rows already loaded. An `IEnumerab