Beispiel #1
0
        public OperationResult Reduce(List <ReduceInventory> command)
        {
            var        operationResult = new OperationResult();
            const long OperationId     = 1;

            foreach (var item in command)
            {
                var inventory = _inventoryRepo.GetByProductId(item.ProductId);
                inventory.Reduce(item.Count, OperationId, item.Description, item.OrderId);
            }

            _inventoryRepo.Save();
            return(operationResult.Succeeded());
        }