Follow-up · depth 4
What are common failure modes of Eager vs Explicit Loading?
What are common failure modes of Eager vs Explicit Loading?
Answers use simple, clear English.
Quick interview answer
Common failures around Eager vs Explicit Loading: blocking the hot path, ignoring backpressure, and weak timeout/retry design. Lazy loading enabled globally causing hidden N+1 in foreach.
Detailed answer
Failure modes for Eager vs Explicit Loading: Known pitfalls: Lazy loading enabled globally causing hidden N+1 in foreach. • Missing timeouts / unbounded retries • No backpressure when downstream slows • Assuming ordering/guarantees the runtime does not provide How seniors prevent them: Prefer Select projection DTOs; AsSplitQuery for multiple collections. Parent context: Mitigate first, then root-cause. Check symptoms against: Lazy loading enabled globally causing hidden N+1 in foreach..
Full explanation
Name concrete failure modes and the mitigation for each — that scores higher than a vague “it can fail.” Include/ThenInclude eager-loads related data in one query. Explicit loading: reference/load after query. Avoid lazy loading in web apps (N+1 in loops).
Follow-up questions
Only answered follow-ups are shown — click to open with full answers
Parent context — Eager vs Explicit Loading
Mitigate first, then root-cause. Check symptoms against: Lazy loading enabled globally causing hidden N+1 in foreach..
View full parent question →