/// <summary> setups the sync logic for member _creditCard</summary>
 /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
 private void SetupSyncCreditCard(IEntityCore relatedEntity)
 {
     if (_creditCard != relatedEntity)
     {
         DesetupSyncCreditCard(true, true);
         _creditCard = (CreditCardEntity)relatedEntity;
         this.PerformSetupSyncRelatedEntity(_creditCard, new PropertyChangedEventHandler(OnCreditCardPropertyChanged), "CreditCard", AdventureWorks.Dal.Adapter.v51.RelationClasses.StaticContactCreditCardRelations.CreditCardEntityUsingCreditCardIdStatic, true, new string[] {  });
     }
 }
 protected ContactCreditCardEntity(SerializationInfo info, StreamingContext context) : base(info, context)
 {
     if (SerializationHelper.Optimization != SerializationOptimization.Fast)
     {
         _creditCard = (CreditCardEntity)info.GetValue("_creditCard", typeof(CreditCardEntity));
         if (_creditCard != null)
         {
             _creditCard.AfterSave += new EventHandler(OnEntityAfterSave);
         }
         _person = (PersonEntity)info.GetValue("_person", typeof(PersonEntity));
         if (_person != null)
         {
             _person.AfterSave += new EventHandler(OnEntityAfterSave);
         }
         this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
     }
     // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
     // __LLBLGENPRO_USER_CODE_REGION_END
 }
 /// <summary> Removes the sync logic for member _creditCard</summary>
 /// <param name="signalRelatedEntity">If set to true, it will call the related entity's UnsetRelatedEntity method</param>
 /// <param name="resetFKFields">if set to true it will also reset the FK fields pointing to the related entity</param>
 private void DesetupSyncCreditCard(bool signalRelatedEntity, bool resetFKFields)
 {
     this.PerformDesetupSyncRelatedEntity(_creditCard, new PropertyChangedEventHandler(OnCreditCardPropertyChanged), "CreditCard", AdventureWorks.Dal.Adapter.v51.RelationClasses.StaticContactCreditCardRelations.CreditCardEntityUsingCreditCardIdStatic, true, signalRelatedEntity, "ContactCreditCards", resetFKFields, new int[] { (int)ContactCreditCardFieldIndex.CreditCardId });
     _creditCard = null;
 }