Loading lesson…
Level 1 · Apprentice0 XP
Use one model to change data and another, simpler one to read it.
Step 1 / 5
ProblemThe domain model is great for placing orders. But the dashboard needs totals by region, joined with customers and products. Loading thousands of aggregates to build it is slow and awkward.
← → step
Before this: The modular monolith
🛠️ Your turn
Reading is not the skill, doing is. Try for ten minutes before you open the hint. Getting stuck first is what makes the solution stick.
1.For one screen that loads many entities just to show a table, write a dedicated query that returns exactly the columns the screen needs as a plain DTO. Compare query count and time before and after.