public ActionResult CreateInventory(InventoryModel model) { if (model is null) { return(NotFound()); } _inventoryRepo.CreateInventory(model); _inventoryRepo.SaveChanges(); return(CreatedAtRoute(nameof(GetInventoryById), new { Id = model.InventoryId }, model)); }