// GET: Airplanes/Edit/5 public async Task <IActionResult> Edit(int?id) { if (id == null) { return(new NotFoundViewResult("MyNotFound")); } var airplane = await _repository.GetByIdAsync(id.Value); if (airplane == null) { return(new NotFoundViewResult("MyNotFound")); } var view = _converterHelper.ToAirplaneViewModel(airplane); return(View(view)); }