// GET: Specialties/Details/5 public async Task <IActionResult> Details(int?id) { if (id == null) { return(NotFound()); } var specialty = await _specialtyRepository.GetByIdAsync(id.Value); if (specialty == null) { return(NotFound()); } return(View(specialty)); }