public async Task <IActionResult> GetEmployeeContact(int personId, [FromQuery] PagingParameters pagingParams) { GetEmployeeContact queryParams = new GetEmployeeContact { PersonID = personId, }; try { var retValue = await _employeeQryReqHdler.Handle <GetEmployeeContact>(queryParams, HttpContext, Response); return(retValue); } catch (Exception ex) { _logger.LogError($"An exception has been thrown: {ex}"); return(BadRequest(ex.Message)); } }
public async Task <IActionResult> GetEmployees([FromQuery] GetEmployees getEmployeesParams) { try { var retValue = await _employeeQryReqHdler.Handle <GetEmployees>(getEmployeesParams, HttpContext, Response); return(retValue); } catch (Exception ex) { _logger.LogError($"An exception has been thrown: {ex}"); return(BadRequest(ex.Message)); } }