Example #1
0
        protected static IEnumerable<Employee> InitEmployeesWithData()
        {
            var countryNL = new Country { Id = 1, Code = "NL", Name = "The Netherlands" };
            var countryBE = new Country { Id = 2, Code = "BE", Name = "Belgium" };

            var mainCompany1 = new MainCompany { Id = 1, Name = "m-1" };
            var mainCompany2 = new MainCompany { Id = 2, Name = "m-2" };

            var companyA = new Company { Id = 1, Name = "A", MainCompany = mainCompany1 };
            var companyB = new Company { Id = 2, Name = "B", MainCompany = mainCompany1 };
            var companyC = new Company { Id = 3, Name = "C", MainCompany = mainCompany2 };

            return InitEmployees(countryNL, countryBE, companyA, companyB, companyC);
        }
Example #2
0
 protected static IEnumerable<Employee> InitEmployees(Country countryNL = null, Country countryBE = null, Company companyA = null, Company companyB = null, Company companyC = null)
 {
     return new List<Employee>
     {
         new Employee { Id = 1, Country = countryNL, Company = companyA, FirstName = "Bill", LastName = "Smith", Email = "[email protected]", EmployeeNumber = 1001, HireDate = Convert.ToDateTime("01/12/1990")},
         new Employee { Id = 2, Country = countryNL, Company = companyB, FirstName = "Jack", LastName = "Smith", Email = "[email protected]", EmployeeNumber = 1002, HireDate = Convert.ToDateTime("12/12/1997")},
         new Employee { Id = 3, Country = countryNL, Company = companyC, FirstName = "Mary", LastName = "Gates", Email = "[email protected]", EmployeeNumber = 1003, HireDate = Convert.ToDateTime("03/03/2000")},
         new Employee { Id = 4, Country = countryNL, Company = companyA, FirstName = "John", LastName = "Doe", Email = "[email protected]", EmployeeNumber = 1004, HireDate = Convert.ToDateTime("11/11/2011")},
         new Employee { Id = 5, Country = countryBE, Company = companyB, FirstName = "Chris", LastName = "Cross", Email = "[email protected]", EmployeeNumber = 1005, HireDate = Convert.ToDateTime("05/05/1995")},
         new Employee { Id = 6, Country = countryBE, Company = companyC, FirstName = "Niki", LastName = "Myers", Email = "[email protected]", EmployeeNumber = 1006, HireDate = Convert.ToDateTime("06/05/1995")},
         new Employee { Id = 7, Country = countryBE, Company = companyA, FirstName = "Joseph", LastName = "Hall", Email = "[email protected]", EmployeeNumber = 1007, HireDate = Convert.ToDateTime("07/05/1995")},
         new Employee { Id = 8, Country = countryBE, Company = companyB, FirstName = "Daniel", LastName = "Wells", Email = "[email protected]", EmployeeNumber = 1008, HireDate = Convert.ToDateTime("08/05/1995")},
         new Employee { Id = 9, Country = countryNL, Company = companyC, FirstName = "Robert", LastName = "Lawrence", Email = "[email protected]", EmployeeNumber = 1009, HireDate = Convert.ToDateTime("09/05/1995")},
         new Employee { Id = 10, Country = countryNL, Company = companyA, FirstName = "Reginald", LastName = "Quinn", Email = "[email protected]", EmployeeNumber = 1010, HireDate = Convert.ToDateTime("10/05/1995")},
         new Employee { Id = 11, Country = countryNL, Company = companyB, FirstName = "Quinn", LastName = "Quick", Email = "[email protected]", EmployeeNumber = 1011, HireDate = Convert.ToDateTime("11/05/1995")},
         new Employee { Id = 12, Country = countryNL, Company = companyC, FirstName = "Test", LastName = "User", Email = "[email protected]", EmployeeNumber = 1012, HireDate = Convert.ToDateTime("11/05/2012")},
     };
 }
        private static IEnumerable<Employee> InitEmployees()
        {
            var mainCompany1 = new MainCompany { Id = 1, Name = "m-1" };
            var mainCompany2 = new MainCompany { Id = 2, Name = "m-2" };

            var companyA = new Company { Id = 1, Name = "A", MainCompany = mainCompany1 };
            var companyB = new Company { Id = 2, Name = "B", MainCompany = mainCompany1 };
            var companyC = new Company { Id = 3, Name = "C", MainCompany = mainCompany2 };

            return new List<Employee>
            {
                new Employee { Id = 1, Company = companyA, FirstName = "Bill", LastName = "Smith", Email = "[email protected]", EmployeeNumber = 1001, HireDate = Convert.ToDateTime("01/12/1990")},
                new Employee { Id = 2, Company = companyB, FirstName = "Jack", LastName = "Smith", Email = "[email protected]", EmployeeNumber = 1002, HireDate = Convert.ToDateTime("12/12/1997")},
                new Employee { Id = 3, Company = companyC, FirstName = "Mary", LastName = "Gates", Email = "[email protected]", EmployeeNumber = 1003, HireDate = Convert.ToDateTime("03/03/2000")},
                new Employee { Id = 4, Company = companyA, FirstName = "John", LastName = "Doe", Email = "[email protected]", EmployeeNumber = 1004, HireDate = Convert.ToDateTime("11/11/2011")},
                new Employee { Id = 5, Company = companyB, FirstName = "Chris", LastName = "Cross", Email = "[email protected]", EmployeeNumber = 1005, HireDate = Convert.ToDateTime("05/05/1995")},
                new Employee { Id = 6, Company = companyC, FirstName = "Niki", LastName = "Myers", Email = "[email protected]", EmployeeNumber = 1006, HireDate = Convert.ToDateTime("05/05/1995")},
                new Employee { Id = 7, Company = companyA, FirstName = "Joseph", LastName = "Hall", Email = "[email protected]", EmployeeNumber = 1007, HireDate = Convert.ToDateTime("05/05/1995")},
                new Employee { Id = 8, Company = companyB, FirstName = "Daniel", LastName = "Wells", Email = "[email protected]", EmployeeNumber = 1008, HireDate = Convert.ToDateTime("05/05/1995")},
                new Employee { Id = 9, Company = companyC, FirstName = "Robert", LastName = "Lawrence", Email = "[email protected]", EmployeeNumber = 1009, HireDate = Convert.ToDateTime("05/05/1995")},
                new Employee { Id = 10, Company = companyA, FirstName = "Reginald", LastName = "Quinn", Email = "[email protected]", EmployeeNumber = 1010, HireDate = Convert.ToDateTime("05/05/1995")},
                new Employee { Id = 11, Company = companyB, FirstName = "Quinn", LastName = "Quick", Email = "[email protected]", EmployeeNumber = 1011, HireDate = Convert.ToDateTime("05/05/1995")},
            };
        }