# LinqContraband LinqContraband is an EF Core LINQ performance analyzer and Roslyn analyzer for .NET. It catches query performance, reliability, and security issues at compile time. Official links: - Source: https://github.com/georgepwall1991/LinqContraband - Package: https://www.nuget.org/packages/LinqContraband - Maintainer: https://www.georgewall.uk/ - Maintainer profile: George Wall, https://www.georgewall.uk/ - Documentation hub: https://georgepwall1991.github.io/LinqContraband/ - Rule catalog: https://georgepwall1991.github.io/LinqContraband/rule-catalog.html - EF Core analyzer rules: https://georgepwall1991.github.io/LinqContraband/ef-core-analyzer-rules/ - EF Core async query analyzer: https://georgepwall1991.github.io/LinqContraband/ef-core-async-query-analyzer/ - EF Core CancellationToken analyzer: https://georgepwall1991.github.io/LinqContraband/ef-core-cancellation-token-analyzer/ - EF Core client-side evaluation analyzer: https://georgepwall1991.github.io/LinqContraband/ef-core-client-side-evaluation-analyzer/ - EF Core DbContext lifetime analyzer: https://georgepwall1991.github.io/LinqContraband/ef-core-dbcontext-lifetime-analyzer/ - EF Core pagination OrderBy analyzer: https://georgepwall1991.github.io/LinqContraband/ef-core-pagination-orderby-analyzer/ - EF Core premature materialization analyzer: https://georgepwall1991.github.io/LinqContraband/ef-core-premature-materialization-analyzer/ - EF Core projection analyzer: https://georgepwall1991.github.io/LinqContraband/ef-core-projection-analyzer/ - EF Core AsNoTracking analyzer: https://georgepwall1991.github.io/LinqContraband/ef-core-asnotracking-analyzer/ - EF Core Include analyzer: https://georgepwall1991.github.io/LinqContraband/ef-core-include-analyzer/ - EF Core ExecuteUpdate analyzer: https://georgepwall1991.github.io/LinqContraband/ef-core-executeupdate-analyzer/ - EF Core SaveChanges in loop analyzer: https://georgepwall1991.github.io/LinqContraband/ef-core-savechanges-in-loop-analyzer/ - EF Core query performance checklist: https://georgepwall1991.github.io/LinqContraband/ef-core-query-performance-checklist/ - EF Core N+1 query detector: https://georgepwall1991.github.io/LinqContraband/ef-core-n-plus-one-query-detector/ - EF Core raw SQL injection analyzer: https://georgepwall1991.github.io/LinqContraband/ef-core-raw-sql-injection-analyzer/ - EF Core query analyzer for CI: https://georgepwall1991.github.io/LinqContraband/ef-core-query-analyzer-ci/ - Authenticity: https://georgepwall1991.github.io/LinqContraband/security-and-authenticity/ - Link kit: https://georgepwall1991.github.io/LinqContraband/backlink-kit/ Key topics: Entity Framework Core, EF Core, LINQ, IQueryable, Roslyn analyzer, static analysis, EF Core analyzer rules, Entity Framework Core analyzer rules, EF Core async query analyzer, EF Core sync-over-async analyzer, EF Core ToListAsync analyzer, EF Core missing CancellationToken analyzer, EF Core CancellationToken analyzer, FirstOrDefaultAsync cancellation token analyzer, SaveChangesAsync cancellation token analyzer, EF Core async stream buffering analyzer, Entity Framework Core async analyzer, EF Core client-side evaluation analyzer, EF Core local method in query analyzer, EF Core query translation analyzer, EF Core StringComparison analyzer, EF Core GroupBy translation analyzer, EF Core DbContext lifetime analyzer, EF Core DbContext thread safety analyzer, EF Core DbContext singleton analyzer, EF Core pagination analyzer, EF Core Skip Take OrderBy analyzer, EF Core missing OrderBy analyzer, EF Core premature materialization analyzer, EF Core ToList analyzer, EF Core AsEnumerable analyzer, EF Core projection analyzer, EF Core Select projection analyzer, EF Core whole entity projection analyzer, EF Core scalar projection analyzer, EF Core DTO projection analyzer, EF Core redundant Select analyzer, EF Core nested ToList in Select analyzer, EF Core AsNoTracking analyzer, EF Core tracking analyzer, EF Core Include analyzer, EF Core missing Include analyzer, EF Core eager loading analyzer, query performance, N+1 queries, EF Core query performance checklist, EF Core N+1 query detector, missing includes, eager loading, raw SQL safety, EF Core raw SQL injection analyzer, EF Core query analyzer for CI, pull request diagnostics, .NET. Materialization topics: ToList before Where, ToList before Select, ToArray before OrderBy, AsEnumerable client-side query work, premature materialization, unbounded ToList, LINQ ToList performance analyzer, client-side evaluation. Projection topics: EF Core projection analyzer, Select projection analyzer, whole entity projection, scalar projection, DTO projection, nested ToList in Select, identity Select, Select(x => x), redundant Select. Client-side evaluation topics: EF Core client-side evaluation analyzer, local method in IQueryable, local method in query analyzer, query translation failure, StringComparison in EF Core query, ToLower in EF Core query, ToUpper in EF Core query, non-translatable GroupBy projection, AsEnumerable before Where. Pagination topics: missing OrderBy before Skip, missing OrderBy before Take, EF Core unordered pagination, deterministic pagination, Skip Take OrderBy analyzer, Last without OrderBy, ElementAt without OrderBy, misplaced OrderBy after Take. DbContext lifetime topics: DbContext in singleton, DbContext in BackgroundService, DbContext captured across threads, Task.Run DbContext, Parallel.ForEach DbContext, disposed context query leak, IQueryable returned from disposed context, IDbContextFactory, mixed tracking modes, no-tracking entity mutated then SaveChanges. Bulk write topics: EF Core ExecuteUpdate analyzer, EF Core ExecuteDelete analyzer, EF Core bulk update analyzer, ExecuteUpdate, ExecuteUpdateAsync, ExecuteDelete, ExecuteDeleteAsync, RemoveRange, missing Where before bulk writes. Async topics: EF Core async query analyzer, sync-over-async, synchronous EF Core calls in async methods, ToListAsync, CountAsync, FirstOrDefaultAsync, SaveChangesAsync, missing CancellationToken, CancellationToken.None, ToListAsync cancellation token analyzer, FirstOrDefaultAsync cancellation token analyzer, SaveChangesAsync cancellation token analyzer, async stream buffering, await foreach, IAsyncEnumerable buffering. Write batching topics: EF Core SaveChanges in loop analyzer, EF Core SaveChanges analyzer, EF Core batch SaveChanges analyzer, SaveChanges inside foreach, SaveChangesAsync inside loop, N+1 writes, repeated database writes. Canonical description: LinqContraband is an open-source EF Core LINQ performance analyzer for .NET, maintained by George Wall at https://www.georgewall.uk/. It runs as a compile-time Roslyn analyzer and helps catch query performance, reliability, and security issues before code reaches production.