private void Fixuppostcode(postcode previousValue) { if (previousValue != null && previousValue.addresses.Contains(this)) { previousValue.addresses.Remove(this); } if (postcode != null) { if (!postcode.addresses.Contains(this)) { postcode.addresses.Add(this); } if (postcode_id != postcode.id) { postcode_id = postcode.id; } } }