public IActionResult Details(int id) { EmployeeViewModel employee = _db.GetById(id); if (employee != null) { return(View(employee)); } else { return(NotFound()); } }
private EmployeeView FindEmployee(int?id) { if (!id.HasValue) { return(null); } var employee = _EmployeeData.GetById(id.Value)?.MapEmployeeView(); return(employee); }
public EmployeeViewModel GetById(int id) { return _employeesData.GetById(id); }