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()); } }
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()); }