private void FixupPerson(Person previousValue) { if (previousValue != null && previousValue.PersonCreditCards.Contains(this)) { previousValue.PersonCreditCards.Remove(this); } if (Person != null) { if (!Person.PersonCreditCards.Contains(this)) { Person.PersonCreditCards.Add(this); } if (BusinessEntityID != Person.BusinessEntityID) { BusinessEntityID = Person.BusinessEntityID; } } }
private void FixupPerson(Person previousValue) { if (previousValue != null && previousValue.Customers.Contains(this)) { previousValue.Customers.Remove(this); } if (Person != null) { if (!Person.Customers.Contains(this)) { Person.Customers.Add(this); } if (PersonID != Person.BusinessEntityID) { PersonID = Person.BusinessEntityID; } } else if (!_settingFK) { PersonID = null; } }
private void FixupPerson(Person previousValue) { if (previousValue != null && ReferenceEquals(previousValue.Password, this)) { previousValue.Password = null; } if (Person != null) { Person.Password = this; if (BusinessEntityID != Person.BusinessEntityID) { BusinessEntityID = Person.BusinessEntityID; } } }
private void FixupPerson(Person previousValue) { if (previousValue != null && ReferenceEquals(previousValue.BusinessEntity, this)) { previousValue.BusinessEntity = null; } if (Person != null) { Person.BusinessEntity = this; } }