// GET: Assistant/Details/5 public async Task <IActionResult> Details(int?id) { if (id == null) { return(new NotFoundViewResult("AssistantNotFound")); } var assistant = await _assistantRepository.GetByIdAsync(id.Value); if (assistant == null) { return(new NotFoundViewResult("AssistantNotFound")); } return(View(assistant)); }