public static IPurchaseOrder Create(IPurchaseOrderProcessor orderProcessor, decimal total, int customerId, IEnumerable <IItemLine> itemLines) { PurchaseOrder po = new PurchaseOrder(orderProcessor) { Total = total, CustomerId = customerId, ItemLines = itemLines }; return(po); }
private PurchaseOrder(IPurchaseOrderProcessor orderProcessor) { _OrderProcessor = orderProcessor; Id = NextId(); _PurchaseOrderStatus = PurchaseOrderStatus.Created; }