public async Task <long> GetManagerBudget(string managerId) { var employees = await _csvReader.GetEmployees(_cSVPath); if (employees != null) { EmployeesServices services = new EmployeesServices(employees); return(services.GetManagersBudget(managerId)); } return(0); }
public async Task <List <Employee> > GetEmployeeRecords() { var employees = await _csvReader.GetEmployees(_cSVPath); if (employees != null) { EmployeesServices services = new EmployeesServices(employees); services.ValidateEmployees(); if (services.IsValid) { return(employees); } throw new AggregateException(services.ValidationErrors); } return(null); }