private void FixupStore(Store previousValue) { if (previousValue != null && previousValue.Customers.Contains(this)) { previousValue.Customers.Remove(this); } if (Store != null) { if (!Store.Customers.Contains(this)) { Store.Customers.Add(this); } if (StoreID != Store.BusinessEntityID) { StoreID = Store.BusinessEntityID; } } else if (!_settingFK) { StoreID = null; } }
private void FixupStore(Store previousValue) { if (previousValue != null && ReferenceEquals(previousValue.BusinessEntity, this)) { previousValue.BusinessEntity = null; } if (Store != null) { Store.BusinessEntity = this; } }