예제 #1
0
        private List <ActivityTemplate> GenerateActivityTemplates(Kindergarter kindergarter)
        {
            List <ActivityTemplate> activitytemplates = new List <ActivityTemplate>();

            activitytemplates.AddRange(
                new List <ActivityTemplate>
            {
                new ActivityTemplate {
                    Id = Guid.NewGuid(), Description = "Clases de ingles", KindergarterId = kindergarter.Id
                },
                new ActivityTemplate {
                    Id = Guid.NewGuid(), Description = "Cuidade matutino", KindergarterId = kindergarter.Id
                },
                new ActivityTemplate {
                    Id = Guid.NewGuid(), Description = "Cuidado Vespertino", KindergarterId = kindergarter.Id
                },
                new ActivityTemplate {
                    Id = Guid.NewGuid(), Description = "Cuidado dia completo", KindergarterId = kindergarter.Id
                },
                new ActivityTemplate {
                    Id = Guid.NewGuid(), Description = "Clases de Ballet", KindergarterId = kindergarter.Id
                },
                new ActivityTemplate {
                    Id = Guid.NewGuid(), Description = "Clases de logica", KindergarterId = kindergarter.Id
                }
            }
                );
            return(activitytemplates);
        }
예제 #2
0
        private List <Kid> GenerateRandonKids(Kindergarter kindergarter, List <Tutor> tutors, Pediatrician pediatrician, int quantity)
        {
            List <Kid> kids = new List <Kid>();

            string[] firstName  = { "Johan", "Lyan", "Dylan", "Aaron" };
            string[] secondName = { "Carlos", "Eduardo", "Enrique", "Emilio" };
            string[] fatherName = { "Faringtom", "Escobar", "Lee", "Stackeetam" };
            string[] motherName = { "Washinton", "White", "Worm", "Snow" };
            Random   rnd        = new Random();

            int count = tutors.Count - 1;

            var kidsList = from fn in firstName
                           from sn in secondName
                           from an in fatherName
                           from mn in motherName
                           select new Kid
            {
                Id               = Guid.NewGuid(),
                FirstName        = fn,
                SecondName       = sn,
                FatherName       = an,
                MotherName       = mn,
                KindergarterId   = kindergarter.Id,
                TutorPrincipalId = tutors[rnd.Next(count)].Id,
                //PediatricianId = pediatrician.Id
            };

            return(kidsList.OrderBy(k => k.Id).Take(quantity).ToList());
        }