Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
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);
        }