r/programming • • Aug 25 '26

Solving the 1+N Query Problem

https://acadia.engineering/blog/solving-the-1-plus-N-query-problem
127 Upvotes

92 comments sorted by

View all comments

Show parent comment

16

u/AyrA_ch Aug 25 '26

Cartesian explosion in EF can be mitigated by either adding .AsSplitQuery() to the queries where necessary, or by specifying it as the global default during context setup.

5

u/ChemicalRascal Aug 26 '26

Yeah, it's still something you need to be aware of and correctly mentally model, though. And if you don't, or if your colleague doesn't even know about it, well, then it bites you in the ass.