public CourseStudent AddStudent(Student student) { if (student.Courses.Contains(this)) { return(null); } else { CourseStudent cs = new CourseStudent(this, student); CourseStudents.Add(cs); student.CourseStudents.Add(cs); return(cs); } }
/// <summary> /// Add a student to a couse /// </summary> /// <param name="student"></param> public void AddStudent(Student student) { CourseStudents.Add(student); }