internal Line(SalesOrderId salesOrder, ProductId product, Quantity quantity, UnitPrice price, SalesTax tax) { Id = new LineId(Guid.NewGuid()); SalesOrder = salesOrder; Quantity = quantity; Product = product; Price = price; Tax = tax; }
public SalesOrder(IDomainEventRaiser observer, CustomerId customer, RefWarehouseId warehouse) { _observer = observer; if (customer == null) { throw new Exception("Customer id cannot be null"); } if (warehouse == null) { throw new Exception("Warehouse id cannot be null"); } Id = new SalesOrderId(Guid.NewGuid()); Customer = customer; _warehouse = warehouse; Status = Status.CreateOpened(); Lines = new Lines(Id, ref _status); }
internal Lines(SalesOrderId salesOrder, ref Status orderStatus) { SalesOrder = salesOrder; OrderStatus = orderStatus; }