public async Task <ActionResult <EmployeeGetModel> > GetEmployee(int id) { try { var employeeResult = await _getEmployeeQuery.Execute(id); if (employeeResult != null) { return(Ok(employeeResult)); } else { return(NotFound()); } } catch (Exception ex) { _logger.Error(ex, ex.Message, null); return(StatusCode(StatusCodes.Status500InternalServerError)); } }
// GET: Employee/Details/5 public ActionResult Details(int id) { var employeeModel = _employeeQuery.Execute(id); return(View(employeeModel)); }