Exemple #1
0
        public virtual void RemoveCourse(Course course)
        {
            var p = new UserCourse(this, course);

            if (_userCourses.Remove(p))
            {
                course.Count--;
            }
            AddEvent(new RemoveCourseEvent(Id));
        }
Exemple #2
0
 public virtual void AssignCourses(IEnumerable <Course> courses)
 {
     foreach (var course in courses)
     {
         var p = new UserCourse(this, course);
         if (_userCourses.Add(p))
         {
             course.Count++;
         }
     }
 }