The N+1 problem also hides from a code review because the query that multiplies is rarely the one you are looking at. It comes from lazy loading being on by default, so a navigation property gets touched inside a loop or a serialiser walks a graph you did not know was there. Turning lazy loading off and projecting with Select is hard, and honestly it is the only way I have found to keep this from creeping back in. The functional tests pass either way, which is why this one tends to reach production before anyone notices.
Adam Lewis
Product Engineer/Architect navigating the AI revolution
The N+1 problem also hides from a code review because the query that multiplies is rarely the one you are looking at. It comes from lazy loading being on by default, so a navigation property gets touched inside a loop or a serialiser walks a graph you did not know was there. Turning lazy loading off and projecting with Select is hard, and honestly it is the only way I have found to keep this from creeping back in. The functional tests pass either way, which is why this one tends to reach production before anyone notices.