Minor improvements and quality refactoring

This commit is contained in:
Mguy13 2023-01-04 19:47:37 +01:00
parent 9e2565d110
commit 4d6f9092eb
7 changed files with 16 additions and 11 deletions

View file

@ -10,7 +10,7 @@ public sealed class OrderModel {
public OrderModel(OrderDto orderDTO) {
OrderId = orderDTO.OrderId;
OrderDescription = orderDTO.Description;
OrderDescription = orderDTO.Description.Trim();
CustomerId = orderDTO.CustomerId;
TotalPrice = orderDTO.Products.Select(product => product.Price).Sum();
}