Exercise 2 solution: OrderLines in the domain, edges unchanged
OrderLine + computed TotalInCents; both inbound mappers reconstruct a one-line order from the flat DTO/row (derived data is re-derived, not written); builder realises WithTotal as a single line. Outbound mappers, DTO, OrderData, DbContext and WebApp untouched — the small-steps payoff. yak: exercise-2-solution-on-branch-exercise-2-solution-hw7e
This commit is contained in:
@@ -55,7 +55,7 @@ public class AfterPersistenceTests
|
||||
db.Save(order);
|
||||
|
||||
order.Description = "one (edited)";
|
||||
order.TotalInCents = 99_00;
|
||||
order.Lines[0].AmountInCents = 99_00;
|
||||
client.Name = "Acme GmbH";
|
||||
db.Save(order);
|
||||
db.Save(client);
|
||||
|
||||
Reference in New Issue
Block a user