public async Task <IActionResult> Details(int?id) { if (id == null) { return(NotFound()); } var petType = await _petTypeRepository.GetPetTypeAsync(id.Value); if (petType == null) { return(NotFound()); } return(View(petType)); }