initial commit v2

This commit is contained in:
2026-09-03 21:06:39 +01:00
commit 4228ccb030
27 changed files with 981 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
namespace OrderDomain;
public class Order
{
public List<OrderLine> Lines { get; } = new();
public decimal Total => Lines.Sum(l => l.Value);
public void AddLine(decimal unitPrice, int quantity)
=> Lines.Add(new OrderLine(unitPrice, quantity));
public void ApplyDiscount(int lineIndex)
=> Lines[lineIndex].ApplyDiscount();
}