private void FixupGenre(Genre previousValue) { if (previousValue != null && previousValue.Tracks.Contains(this)) { previousValue.Tracks.Remove(this); } if (Genre != null) { if (!Genre.Tracks.Contains(this)) { Genre.Tracks.Add(this); } if (GenreId != Genre.GenreId) { GenreId = Genre.GenreId; } } else if (!_settingFK) { GenreId = null; } }