示例#1
0
        public static ICollection <Student> RandomStudents()
        {
            ICollection <Student> studentsCollection = new List <Student>();

            for (int count = 0; count < Ints.InitialStudentsCount; count++)
            {
                Student newStudent = new Student();
                newStudent.Name         = GeneratorHelper.PersonName(Text.FirstNames, Text.LaststNames);
                newStudent.PhoneNumber  = GeneratorHelper.PhoneNumber();
                newStudent.Birthday     = GeneratorHelper.Date();
                newStudent.RegisteredOn = GeneratorHelper.Date(newStudent.Birthday.Value.Year);
                studentsCollection.Add(newStudent);
            }
            return(studentsCollection);
        }
示例#2
0
        public static ICollection <Course> Courses()
        {
            ICollection <Course> courseesCollection = new List <Course>();

            for (int count = 0; count < Text.Courses.Length; count++)
            {
                decimal price = GeneratorHelper.Price();
                for (int repeatingCount = 0; repeatingCount < 5; repeatingCount++)
                {
                    Course newCourse = new Course();
                    newCourse.Name  = Text.Courses[count];
                    newCourse.Price = price;
                }
            }
            return(courseesCollection);
        }