Rule reference

LinqContraband Rule Catalog

Full LinqContraband EF Core analyzer rule catalog grouped by query, materialization, loading, async, tracking, raw SQL, and schema design.

The source of truth for rule metadata lives in src/LinqContraband/Catalog/RuleCatalog.cs. This page is generated from that catalog and grouped by EF Core failure mode.

45rules
27warnings
30code fixes

8 diagnostic domains

Bulk Operations & Set-Based Writes

Keep destructive and high-volume writes set-based while making the risky cases explicit.

Change Tracking & Context Lifetime

Spot DbContext lifetime leaks, tracking-mode surprises, and writes that silently do nothing.

Execution & Async

Find synchronous calls, repeated database execution, and async paths that drop cancellation or buffer too early.

Loading & Includes

Make relationship loading deliberate before N+1 round trips or over-eager include graphs reach production.

Materialization & Projection

Keep work in SQL where it belongs and avoid loading whole entities or unbounded result sets by accident.

Query Shape & Translation

Catch LINQ patterns that EF Core cannot translate reliably or cannot page deterministically.

Raw SQL & Security

Flag SQL construction patterns that can bypass parameterization, tenant filters, or review expectations.

Schema & Modeling

Guard model shape choices that produce fragile entity mappings and unclear relationships.