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