private Order(int orderId,
               List <OrderLine> orderLines,
               int customerId,
               decimal totalCost,
               decimal shippingCost,
               Address billingAddress,
               Address shippingAddress,
               string promotionCode,
               DateTime datePlaced,
               List <TransitLocation> transitLocations,
               ICostCalculatorService costCalculatorService,
               IProductAvailabilityService productAvailabilityService,
               IOrderTrackingRepository orderTrackingRepository)
 {
     OrderId                     = orderId;
     OrderLines                  = orderLines;
     CustomerId                  = customerId;
     TotalCost                   = totalCost;
     ShippingCost                = shippingCost;
     PromotionCode               = promotionCode;
     BillingAddress              = billingAddress;
     ShippingAddress             = shippingAddress;
     DatePlaced                  = datePlaced;
     TransitLocations            = transitLocations;
     _costCalculatorService      = costCalculatorService;
     _orderTrackingRepository    = orderTrackingRepository;
     _productAvailabilityService = productAvailabilityService;
 }
Beispiel #2
0
 public OrderService(IPublisher publisher, ICostCalculatorService costCalculatorService, IOrderRepository orderRepository, IOrderTrackingRepository orderTrackingRepository, IProductAvailabilityService productAvailabilityService)
 {
     _publisher                  = publisher;
     _costCalculatorService      = costCalculatorService;
     _orderRepository            = orderRepository;
     _orderTrackingRepository    = orderTrackingRepository;
     _productAvailabilityService = productAvailabilityService;
 }
 public static Order Create(List <OrderLine> orderLines,
                            int customerId,
                            Address billingAddress,
                            Address shippingAddress,
                            string promotionCode,
                            DateTime datePlaced,
                            ICostCalculatorService costCalculatorService,
                            IProductAvailabilityService productAvailabilityService,
                            IOrderTrackingRepository orderTrackingRepository)
 {
     return(new Order(-1, orderLines, customerId, -1, -1, billingAddress, shippingAddress, promotionCode, datePlaced, null, costCalculatorService, productAvailabilityService, orderTrackingRepository));
 }
 public void WithOrderTrackingRepository(IOrderTrackingRepository orderTrackingRepository)
 {
     _orderTrackingRepository = orderTrackingRepository;
 }
Beispiel #5
0
 public OrderStatusService(IUnitOfWork uow, IOrderTrackingRepository orderTrackingRepository)
 {
     _uow = uow;
     _orderTrackingRepository = orderTrackingRepository;
 }