示例#1
0
 protected override void Seed(CodeFirst.DatabaseModelContainer context)
 {
     for (int i = 1; i < 300; i++)
     {
         context.EmployeeSet.Add(new EmployeeModel()
         {
             Name           = "qwe" + i.ToString(),
             Surname        = "zxc" + i.ToString(),
             Position       = positionsService.GetValue(i % 5),
             ActualProjects = new List <ProjectModel>(),
             AbsenceList    = new List <ManagingDateModel>()
         });
     }
 }
示例#2
0
        protected override void Seed(CodeFirst.DatabaseModelContainer context)
        {
            for (int i = 1; i < 1000; i++)
            {
                context.EmployeeSet.Add(new EmployeeModel()
                {
                    Name           = "qwe" + i.ToString(),
                    Surname        = "zxc" + i.ToString(),
                    Position       = positionsService.GetValue(i % 5),
                    ActualProjects = new List <ProjectModel>(),
                    AbsenceList    = new List <ManagingDateModel>(),
                    Email          = "test" + i.ToString() + "@test.com"
                });
            }

            /*for (int i = 1; i < 50; i++)
             * {
             *  context.ProjectSet.Add(new ProjectModel()
             *  {
             *      Name = "qwe" + i.ToString()
             *  });
             * }*/
        }