public async Task <IActionResult> Edit(int?id) { if (id == null) { return(NotFound()); } var employee = await _context.Employee.SingleOrDefaultAsync(m => m.ID == id); if (employee == null) { return(NotFound()); } PrepareVoivodeshipsAndCountires(); return(View(EmployeeMapper.MapEmployeeToView(employee, _context))); }
public async Task <IActionResult> Details(int?id) { if (id == null) { return(NotFound()); } var employee = await _context.Employee .SingleOrDefaultAsync(m => m.ID == id); if (employee == null) { return(NotFound()); } return(View(EmployeeMapper.MapEmployeeToView(employee, _context))); }