public IActionResult UpdateInventory(Inventory inventory) { try { inventoryServices.UpdateInventory(inventory); return(CreatedAtAction("UpdateInventory", inventory)); } catch (Exception) { return(BadRequest()); } }