/// <summary> setups the sync logic for member _customerDemographics</summary>
 /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
 private void SetupSyncCustomerDemographics(IEntityCore relatedEntity)
 {
     if (_customerDemographics != relatedEntity)
     {
         DesetupSyncCustomerDemographics(true, true);
         _customerDemographics = (CustomerDemographicsEntity)relatedEntity;
         this.PerformSetupSyncRelatedEntity(_customerDemographics, new PropertyChangedEventHandler(OnCustomerDemographicsPropertyChanged), "CustomerDemographics", Northwind.DAL.RelationClasses.StaticCustomerCustomerDemoRelations.CustomerDemographicsEntityUsingCustomerTypeIdStatic, true, new string[] {  });
     }
 }
 protected CustomerCustomerDemoEntity(SerializationInfo info, StreamingContext context) : base(info, context)
 {
     if (SerializationHelper.Optimization != SerializationOptimization.Fast)
     {
         _customers = (CustomerEntity)info.GetValue("_customers", typeof(CustomerEntity));
         if (_customers != null)
         {
             _customers.AfterSave += new EventHandler(OnEntityAfterSave);
         }
         _customerDemographics = (CustomerDemographicsEntity)info.GetValue("_customerDemographics", typeof(CustomerDemographicsEntity));
         if (_customerDemographics != null)
         {
             _customerDemographics.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 _customerDemographics</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 DesetupSyncCustomerDemographics(bool signalRelatedEntity, bool resetFKFields)
 {
     this.PerformDesetupSyncRelatedEntity(_customerDemographics, new PropertyChangedEventHandler(OnCustomerDemographicsPropertyChanged), "CustomerDemographics", Northwind.DAL.RelationClasses.StaticCustomerCustomerDemoRelations.CustomerDemographicsEntityUsingCustomerTypeIdStatic, true, signalRelatedEntity, "CustomerCustomerDemo", resetFKFields, new int[] { (int)CustomerCustomerDemoFieldIndex.CustomerTypeId });
     _customerDemographics = null;
 }