Beispiel #1
0
        public void RemoveTeacher(Teacher teacher)
        {
            var teacherDiscipline = TeacherDisciplines.FirstOrDefault(x => x.Teacher.Id == teacher.Id);

            if (teacherDiscipline == null)
            {
                throw new ArgumentException("Teacher must be into discipline list.");
            }
            TeacherDisciplines.Remove(teacherDiscipline);
        }
Beispiel #2
0
 public void AddTeacher(Teacher teacher)
 {
     TeacherDisciplines.Add(new TeacherDiscipline(this, teacher));
 }