public Order(User user, IEnumerable <ProductOrder> productOrders, OrderDiscount orderDiscount, Shipment shipment, Payment payment,
              decimal basePrice, decimal finalPrice, string comment, Address address)
 {
     IsClosed  = false;
     Comment   = comment;
     BasePrice = basePrice;
     SetShipment(shipment);
     SetPayment(payment);
     CreationDateTime = DateTimeOffset.UtcNow;
     AddProductOrders(productOrders);
     SetDiscount(orderDiscount);
     SetAddress(address);
     FinalPrice = finalPrice;
     SetUser(user);
     DiscountValue = orderDiscount?.PercentValue;
 }
Exemple #2
0
 public void SetDiscount(OrderDiscount discount)
 => OrderDiscount = discount;