示例#1
0
        public void Update(ProductStock productStock)
        {
            var dprod = _productsRepo.All().SingleOrDefault(prod => prod.Id == productStock.Id);

            if (dprod != null)
            {
                dprod.UnitsInStock = productStock.UnitsInStock;
                _productsRepo.AddOrUpdate(dprod);
            }
        }