public IEnumerable <PayrollMonthDescriptionDTO> GetAllPayrollMonths(int fyId) { List <PayrollMonthDescriptionDTO> Records = new List <PayrollMonthDescriptionDTO>(); IEnumerable <PayrollMonthDescription> modelDatas = _unitOfWork.PayrollMonthDescriptipnRepository.All().Where(x => x.FyId == Convert.ToInt32(fyId)).ToList(); foreach (var str in modelDatas) { PayrollMonthDescriptionDTO Singles = new PayrollMonthDescriptionDTO(); Singles = PayrollMonthDescriptionRequestFormatter.ConvertRespondentInfoToDTO(str); Singles.Fiscal = FiscalRequestFormatter.ConvertRespondentInfoToDTO(str.Fiscal); Records.Add(Singles); } return(Records); }
public FiscalDTO GetFiscalById(int id) { return(FiscalRequestFormatter.ConvertRespondentInfoToDTO(_unitOfWork.FiscalRepository.GetById(id))); }