efcore-reviewlisted
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