order total: TotalInCents on both Orders, mapped into OrderDto and OrderData

yak: ordertotalincents-on-both-sides-dto-mapping-j00p
This commit is contained in:
2026-09-16 18:39:48 +01:00
parent 49f4ca395f
commit 803580786b
8 changed files with 39 additions and 9 deletions
+3
View File
@@ -72,6 +72,7 @@ public static class Mappers
{
Id = order.Id,
Description = order.Description,
TotalInCents = order.TotalInCents,
ClientDto = order.Client is null ? null : MapClient(order.Client, seen),
};
seen[order] = dto;
@@ -102,6 +103,7 @@ public static class Mappers
{
Id = dto.Id,
Description = dto.Description,
TotalInCents = dto.TotalInCents,
Client = dto.ClientDto is null ? null : UnmapClient(dto.ClientDto, seen),
};
seen[dto] = order;
@@ -132,6 +134,7 @@ public static class Mappers
{
Id = order.Id,
Description = order.Description,
TotalInCents = order.TotalInCents,
ClientId = order.Client?.Id ?? Guid.Empty,
};
}