Eager loading fetches related data upfront instead of letting each property access trigger another database query. It helps prevent the N+1 problem: one query for a list, then one more for every item. section 6.8.1
Load orders with their users
Loading 50 orders and then reading each order’s user name can trigger 51 database calls. In Entity Framework, request the related users upfront: `db.Orders.Include(o => o.User).Take(50).ToList()`. The related data is fetched together rather than piecemeal. section 6.8.1
Treat data access as explicit I/O: avoid lazy-loaded properties in performance-critical loops, and fetch collections upfront or project them into DTOs. Eager loading can use one or two optimized queries; for complex reports, hand-crafted SQL may be a better fit. section 8.3.2
Figure 6.13 The N+1 Performance Trap: Fetching related child records inside a loop cripples your database with excessive network chatter. The architectural fix is to batch those requests into a single trip using Eager Loading or a DataLoader.

The diagram contrasts repeated child-record lookups with batching related data into one trip. section 6.8.1



