public Order CreateOrder(int buyerId, List <OrderItem> orderItems) { var orderNumber = OrderHelpers.GenerateOrderNumber(); var order = new Order(buyerId, orderNumber, orderItems) { Status = OrderStatus.Pending }; return(_orderRepository.Add(order)); }