private void FixupTrack(Track previousValue) { if (previousValue != null && previousValue.InvoiceLines.Contains(this)) { previousValue.InvoiceLines.Remove(this); } if (Track != null) { if (!Track.InvoiceLines.Contains(this)) { Track.InvoiceLines.Add(this); } if (TrackId != Track.TrackId) { TrackId = Track.TrackId; } } }