Beispiel #1
0
        public Course CreateCourse(Member professor, int periodTime, DateTime?beginning, int maxParticipants, string location, string range)
        {
            var course = Courses.Create();

            course.PeriodTime      = periodTime;
            course.Beginning       = beginning;
            course.MaxParticipants = maxParticipants;
            course.Location        = location;
            course.RangeOfAge      = range;
            // ici on établit les relations dans le sens N-1
            course.Professor       = professor;
            course.ProfessorPseudo = professor.Pseudo;
            Courses.Add(course);
            return(course);
        }