public IActionResult Details(int id) { var cat = _catRepository.GetCatByID(id); if (cat == null) { return(NotFound()); } return(View(cat)); }