From the eShop (AdventureWorks), mapped as three services architecture map
Order Queries reads straight from the write side's OrderingContext, not a separate read model
OrderQueries is not a separate read model. All three of its queries run LINQ against the write side's EF Core OrderingContext and map its entities to DTOs by hand. Both order totals use Units × UnitPrice, the same formula as Order.GetTotal(), and neither subtracts the stored Discount. OrdersApi uses it for every order lookup, so a change to the Order aggregate's EF mapping changes what the API returns.
Impact: Any EF Core mapping change to the Order aggregate changes the shape or values the API returns, and the total shown to callers never reflects the per-item Discount stored on the order, since neither query subtracts it.
Recommendation (medium effort): Have OrderQueries subtract each item's Discount when computing Total, and treat the write model's mapping as a contract OrderQueries depends on — review it whenever the Order aggregate's schema changes.
The trail
Open on the mapMore from this board
- Identified Command swallows a failed CreateOrder and still reports success on retry
- An unreachable embedding model blocks product price changes
- Failed catalog price-change events are marked failed and never retried
- RabbitMQ status handlers skip the idempotency check HTTP commands get
- Awaiting-validation stock check confirms orders for unknown product ids
- Order-status updates only reach shoppers on the WebApp process that handled the event
- A rejected order still empties the shopper's bag
- A retired catalog item breaks Cart Menu's basket load everywhere