Пример #1
0
        public ActionResult <Inventory> UpdateInventory(string id, Inventory inv)
        {
            var inventory = _repo.UpdateInventory(id, inv);

            if (inv.Id != id)
            {
                return(NotFound());
            }

            return(inventory);
        }
        public ActionResult <InventoryModel> UpdateInventory(int id, InventoryModel model)
        {
            try
            {
                _inventoryRepo.UpdateInventory(id, model);
                _inventoryRepo.SaveChanges();

                return(NoContent());
            }
            catch (Exception e)
            {
                return(NotFound(e.Message));
            }
        }
 public void UpdateInventory(Inventory inventory)
 {
     inventRepo.UpdateInventory(inventory);
 }
Пример #4
0
 public bool UpdateInventory()
 {
     return(_inventoryRepo.UpdateInventory());
 }