private void FixupStateProvince(StateProvince previousValue) { if (previousValue != null && previousValue.SalesTaxRates.Contains(this)) { previousValue.SalesTaxRates.Remove(this); } if (StateProvince != null) { if (!StateProvince.SalesTaxRates.Contains(this)) { StateProvince.SalesTaxRates.Add(this); } if (StateProvinceID != StateProvince.StateProvinceID) { StateProvinceID = StateProvince.StateProvinceID; } } }