Exemplo n.º 1
0
        public async Task <IEnumerable <EmployeeDto> > GetEmployeeAll()
        {
            var employees = await this.employeeRepository.GetAll();

            if (employees.Count() > 0)
            {
                return(employees.Select(e => FactoryEmployee.GetEmployeeDto(e)));
            }
            return(null);
        }
Exemplo n.º 2
0
        public async Task <EmployeeDto> GetEmployee(int id)
        {
            var employee = await this.employeeRepository.GetById(id);

            if (employee != null)
            {
                return(FactoryEmployee.GetEmployeeDto(employee));
            }
            return(null);
        }