public ActionResult <InventoryModel> GetInventoryById(int id) { try { var inventory = _inventoryRepo.GetInventoryById(id); if (inventory is null) { return(NotFound()); } return(Ok(inventory)); } catch (Exception e) { return(NotFound(e.Message)); } }
public Inventory GetInventoryById(int id) { return(repo.GetInventoryById(id)); }