public IActionResult EmployeeView(int id) { var employee = _employeesData.GetByID(id); if (id == 0 || employee == null) { employee = new EmployeeViews(0, null, null, 0); } return(View(employee)); }
public IActionResult Details(int id) { var employee = _employeesData.GetByID(id); if (employee == null) { return(NotFound()); } return(View(employee)); }
public IActionResult Details(int id) { var employee = employeesData.GetByID(id); if (ReferenceEquals(employee, null)) { return(NotFound()); } return(View(employee)); }
public IActionResult Details(int?id) { if (id is null) { return(BadRequest()); } var employee = _employeesData.GetByID((int)id); if (employee is null) { return(NotFound()); } return(View(employee)); }