// GET: Supervisors/Edit/5 public async Task <IActionResult> Edit(int?id) { if (id == null) { return(NotFound()); } var supervisor = await _supervisorRepository.Find(id); if (supervisor == null) { return(NotFound()); } var supervisorEditViewModel = _mapper.Map <SupervisorEditViewModel>(supervisor); return(View(supervisorEditViewModel)); }