public IEnumerable<SalaryViewModel> GetEmployeeSalaryHistory(int employeeId)
 {
     var request = new GetEmployeeSalaryHistoryRequest(employeeId);
         var response = this.employeeService.GetSalaryHistory(request);
         if (response != null && response.Exception == null)
         {
             return response.SalaryHistory.ToList();
         }
         return null;
 }
        public GetEmployeeSalaryHistoryResponse GetSalaryHistory(GetEmployeeSalaryHistoryRequest request)
        {
            GetEmployeeSalaryHistoryResponse response = new GetEmployeeSalaryHistoryResponse();

            var salaryHistory = this.salaryRepository.GetSalaryHistotyByEmployeeId(request.Id);

            if (salaryHistory != null)
            {
                response.SalaryHistory = salaryHistory.ConvertToViewModels();
            }
            else
            {
                response.Exception = this.GetGenericResourceNotFoundException();
            }
            return response;
        }