private void FixupCountry(Country previousValue) { if (previousValue != null && previousValue.OrgUnits.Contains(this)) { previousValue.OrgUnits.Remove(this); } if (Country != null) { if (!Country.OrgUnits.Contains(this)) { Country.OrgUnits.Add(this); } if (CountryId != Country.Id) { CountryId = Country.Id; } } else if (!_settingFK) { CountryId = null; } }
private void FixupCountry(Country previousValue) { if (previousValue != null && previousValue.States.Contains(this)) { previousValue.States.Remove(this); } if (Country != null) { if (!Country.States.Contains(this)) { Country.States.Add(this); } if (CountryId != Country.Id) { CountryId = Country.Id; } } }