private void UpdateOrderProductStock(Order newOrder)
 {
     for (int i = 0; i < newOrder.OrderLines.Count; i++)
     {
         newOrder.OrderLines[i].ProductStock.Quantity -= newOrder.OrderLines[i].Quantity;
         _productStockRepository.Update(newOrder.OrderLines[i].ProductStock);
     }
 }
Exemplo n.º 2
0
 public ProductStock Update(ProductStock updatedProductStock)
 {
     ValidateUpdate(updatedProductStock);
     return(_productStockRepository.Update(updatedProductStock));
 }