Stop duplicated rows when EF Core loads multiple collections
Use AsSplitQuery to avoid Cartesian duplication when loading several collection navigations in one Entity Framework Core query.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Use AsSplitQuery to avoid Cartesian duplication when loading several collection navigations in one Entity Framework Core query.
Decide between EF Core split and single queries when using Include: a comparison table, the real trade-offs (round-trips vs row duplication), and how to verify the generated SQL.
Minimal APIs let you expose a full REST service in under 50 lines, cutting boilerplate while keeping ASP.NET Core’s routing, DI, and Swagger. This guide shows a working TODO example, trade‑offs, and when to use them.
Rider can show the SQL your EF Core Take/Skip pagination generates before you run it. Here's how to use that preview to catch full-table scans, N+1 queries, and deep-offset problems early.
EF Core owned types default to required; this diagnostic guide helps you identify why migrations scaffold NOT NULL columns and how to fix them with .IsRequired(false) and verification steps.
EF Core's IAsyncEnumerable streams rows instead of materializing them, but only if you also stop tracking and accept a connection held open for the loop.
EF Core’s AsSplitQuery splits collection includes into separate queries, preventing cartesian explosion. This guide explains the mechanism, shows a worked example, and covers limits and common pitfalls.
Stop jumping between your IDE and database manager. Learn how to use JetBrains Rider's database integration and language injection to validate SQL strings against live schemas.
Entity Framework Core DbContext pooling, introduced in version 5.0, reuses context instances across requests to reduce allocation overhead. Production environments commonly enable pooling via service configuration, while local development often defaults to disabled or in-memory providers, obscuring state-related side effects. When pooling is active, change-t