public IActionResult Edit(int?id) { if (id == null) { return(NotFound()); } var engineer = service.Find(id ?? 0); if (engineer == null) { return(NotFound()); } EngineerEditModel model = new EngineerEditModel { ID = engineer.ID, FirstName = engineer.FirstName, LastName = engineer.LastName, IsAvailable = engineer.IsAvailable }; return(View(model)); }