static void Main(string[] args)
        {
            ScqftrDto item = new ScqftrDto();

            item.ColumnName  = "Kim Column";
            item.ColumnTitle = "Kim Title";
            item.ID          = 1;
            item.CreateDate  = DateTime.Now;
            List <ScqftrDto> list = Enumerable.Repeat(item, 100).ToList();

            ListVisualizer.TestShowVisualizer(list);
            Console.Read();
        }
Пример #2
0
        static void Main(string[] args)
        {
            List <Department> deptList = new List <Department>(new[] {
                new Department {
                    DepartmentId = 1, DName = "PHP"
                },
                new Department {
                    DepartmentId = 2, DName = "Mobile"
                },
                new Department {
                    DepartmentId = 3, DName = "Java"
                }
            });

            List <Employee> empList = new List <Employee>(new[] {
                new Employee {
                    Name = "First", Salary = 2000, DepartmentId = 1, Dept = deptList.FirstOrDefault(d => d.DepartmentId == 1)
                },
                new Employee {
                    Name = "Second", Salary = 1000, DepartmentId = 2, Dept = deptList.FirstOrDefault(d => d.DepartmentId == 2)
                },
                new Employee {
                    Name = "Third", Salary = 1000, DepartmentId = 3, Dept = deptList.FirstOrDefault(d => d.DepartmentId == 3)
                },
                new Employee {
                    Name = "Fourth", Salary = 4000, DepartmentId = 3, Dept = deptList.FirstOrDefault(d => d.DepartmentId == 3)
                },
            });

            foreach (var dept in deptList)
            {
                dept.Employees = empList.Where(e => e.DepartmentId == dept.DepartmentId).ToList();
            }

            ListVisualizer.TestShowVisualizer(empList);

            //Console.ReadLine();
        }