public IEnumerable<TitleViewModel> GetEmployeeTitleHistory(int employeeId) { var request = new GetEmployeeTitleHistoryRequest(employeeId); var response = this.employeeService.GetTitleHistory(request); if (response != null && response.Exception == null) { return response.TitleHistory.ToList(); } return null; }
public GetEmployeeTitleHistoryResponse GetTitleHistory( GetEmployeeTitleHistoryRequest getEmployeeTitleHistoryRequest) { var response = new GetEmployeeTitleHistoryResponse(); var titles = this.titleRepository.GetTitleHistory(getEmployeeTitleHistoryRequest.Id); if (titles != null) { response.TitleHistory = titles.ConvertToViewModels(); } else { response.Exception = this.GetGenericResourceNotFoundException(); } return response; }