Ejemplo n.º 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);
        }
Ejemplo n.º 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 = "*****@*****.**", EmployeeNumber = 1001, HireDate = Convert.ToDateTime("01/12/1990")},
         new Employee { Id = 2, Country = countryNL, Company = companyB, FirstName = "Jack", LastName = "Smith", Email = "*****@*****.**", EmployeeNumber = 1002, HireDate = Convert.ToDateTime("12/12/1997")},
         new Employee { Id = 3, Country = countryNL, Company = companyC, FirstName = "Mary", LastName = "Gates", Email = "*****@*****.**", EmployeeNumber = 1003, HireDate = Convert.ToDateTime("03/03/2000")},
         new Employee { Id = 4, Country = countryNL, Company = companyA, FirstName = "John", LastName = "Doe", Email = "*****@*****.**", EmployeeNumber = 1004, HireDate = Convert.ToDateTime("11/11/2011")},
         new Employee { Id = 5, Country = countryBE, Company = companyB, FirstName = "Chris", LastName = "Cross", Email = "*****@*****.**", EmployeeNumber = 1005, HireDate = Convert.ToDateTime("05/05/1995")},
         new Employee { Id = 6, Country = countryBE, Company = companyC, FirstName = "Niki", LastName = "Myers", Email = "*****@*****.**", EmployeeNumber = 1006, HireDate = Convert.ToDateTime("06/05/1995")},
         new Employee { Id = 7, Country = countryBE, Company = companyA, FirstName = "Joseph", LastName = "Hall", Email = "*****@*****.**", EmployeeNumber = 1007, HireDate = Convert.ToDateTime("07/05/1995")},
         new Employee { Id = 8, Country = countryBE, Company = companyB, FirstName = "Daniel", LastName = "Wells", Email = "*****@*****.**", EmployeeNumber = 1008, HireDate = Convert.ToDateTime("08/05/1995")},
         new Employee { Id = 9, Country = countryNL, Company = companyC, FirstName = "Robert", LastName = "Lawrence", Email = "*****@*****.**", EmployeeNumber = 1009, HireDate = Convert.ToDateTime("09/05/1995")},
         new Employee { Id = 10, Country = countryNL, Company = companyA, FirstName = "Reginald", LastName = "Quinn", Email = "*****@*****.**", EmployeeNumber = 1010, HireDate = Convert.ToDateTime("10/05/1995")},
         new Employee { Id = 11, Country = countryNL, Company = companyB, FirstName = "Quinn", LastName = "Quick", Email = "*****@*****.**", EmployeeNumber = 1011, HireDate = Convert.ToDateTime("11/05/1995")},
         new Employee { Id = 12, Country = countryNL, Company = companyC, FirstName = "Test", LastName = "User", Email = "*****@*****.**", EmployeeNumber = 1012, HireDate = Convert.ToDateTime("11/05/2012")},
     };
 }