コード例 #1
0
        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;
                }
            }
        }
コード例 #2
0
ファイル: Customer.cs プロジェクト: Slicksim/DTO-Mapping-Test
        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;
            }
        }
コード例 #3
0
ファイル: Password.cs プロジェクト: Slicksim/DTO-Mapping-Test
        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;
                }
            }
        }
コード例 #4
0
        private void FixupPerson(Person previousValue)
        {
            if (previousValue != null && ReferenceEquals(previousValue.BusinessEntity, this))
            {
                previousValue.BusinessEntity = null;
            }

            if (Person != null)
            {
                Person.BusinessEntity = this;
            }
        }