private void FixupCourse(Course previousValue)
{
if (previousValue != null && previousValue.Levels.Contains(this))
{
previousValue.Levels.Remove(this);
}
if (Course != null)
{
if (!Course.Levels.Contains(this))
{
Course.Levels.Add(this);
}
if (CourseId != Course.CourseId)
{
CourseId = Course.CourseId;
}
}
}