public async Task <List <EmployeeResponse> > GetAllEmployeeContract() { EmployeesDTO employeesDTO = new EmployeesDTO(); var employeesResponse = await employeesDTO.GetAllAnnualSalary(); if (employeesResponse != null) { foreach (var e in employeesResponse) { EmployeeAbstract employeeAbstract = CalculateAnnualSalary(e); employeeAbstract.GetAnnualSalary(e); } } return(employeesResponse); }
public async Task <List <EmployeeResponse> > GetEmployeeById(int id) { List <EmployeeResponse> responseList = new List <EmployeeResponse>(); EmployeesDTO employeesDTO = new EmployeesDTO(); var employeesResponse = await employeesDTO.GetEmployeeById(id); if (employeesResponse != null) { EmployeeAbstract employeeAbstract = CalculateAnnualSalary(employeesResponse); employeeAbstract.GetAnnualSalary(employeesResponse); responseList.Add(employeesResponse); return(responseList); } else { return(null); } }