Ejemplo n.º 1
0
        public static List <Participation> Seed()
        {
            List <Participation> participations = new List <Participation>();

            foreach (Project project in ProjectSeed.Seed())
            {
                Project projectObject = project;

                foreach (Person person1 in PersonSeed.Seed())
                {
                    Participation participation = new Participation(Helper.ConcatGuid(project.Id, person1.Id)) //using concat of projectID and personID
                    {
                        PersonId  = person1.Id,
                        ProjectId = projectObject.Id,
                        Active    = true,
                        Remark    = "remark",
                        MaxWorkingHoursPerWeek = 12,
                    };
                    participations.Add(participation);
                }
            }



            return(participations);
        }
Ejemplo n.º 2
0
        public static List <Manager> Seed()
        {
            List <Manager> managers = new List <Manager>();

            foreach (Project project in ProjectSeed.Seed())
            {
                Person one = Helper.ReturnRandomEntity(PersonSeed.Seed());
                Person two = Helper.ReturnRandomEntity(PersonSeed.Seed());
                while (one.Id == two.Id)
                {
                    two = Helper.ReturnRandomEntity(PersonSeed.Seed());
                }

                managers.Add(new Manager(Guid.NewGuid())
                {
                    PersonId  = one.Id,
                    ProjectId = project.Id
                });
                managers.Add(new Manager(Guid.NewGuid())
                {
                    PersonId  = two.Id,
                    ProjectId = project.Id
                });
            }

            return(managers);
        }