示例#1
0
        public override void Execute()
        {
            int age = int.Parse(Parameters[0]);
            ICollection <EmployeeSalManDTO> employeeDTOs = employeeController.ListEmployeesOlderThan(age);

            foreach (var employeeDTO in employeeDTOs)
            {
                Console.WriteLine(employeeDTO.ToString());
            }
        }
示例#2
0
        public string Execute(string[] args)
        {
            int age = int.Parse(args[0]);

            EmployeeByAgeDto[] employees = (EmployeeByAgeDto[])controller.ListEmployeesOlderThan(age);

            var employeeSb = new StringBuilder();

            foreach (var employeeByAgeDto in employees)
            {
                employeeSb.AppendLine(employeeByAgeDto.ToString().TrimEnd());
            }

            return(employeeSb.ToString().TrimEnd());
        }