/// <summary> setups the sync logic for member _illustration</summary>
 /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
 private void SetupSyncIllustration(IEntityCore relatedEntity)
 {
     if (_illustration != relatedEntity)
     {
         DesetupSyncIllustration(true, true);
         _illustration = (IllustrationEntity)relatedEntity;
         this.PerformSetupSyncRelatedEntity(_illustration, new PropertyChangedEventHandler(OnIllustrationPropertyChanged), "Illustration", AdventureWorks.Dal.Adapter.v51.RelationClasses.StaticProductModelIllustrationRelations.IllustrationEntityUsingIllustrationIdStatic, true, new string[] {  });
     }
 }
 protected ProductModelIllustrationEntity(SerializationInfo info, StreamingContext context) : base(info, context)
 {
     if (SerializationHelper.Optimization != SerializationOptimization.Fast)
     {
         _illustration = (IllustrationEntity)info.GetValue("_illustration", typeof(IllustrationEntity));
         if (_illustration != null)
         {
             _illustration.AfterSave += new EventHandler(OnEntityAfterSave);
         }
         _productModel = (ProductModelEntity)info.GetValue("_productModel", typeof(ProductModelEntity));
         if (_productModel != null)
         {
             _productModel.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 _illustration</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 DesetupSyncIllustration(bool signalRelatedEntity, bool resetFKFields)
 {
     this.PerformDesetupSyncRelatedEntity(_illustration, new PropertyChangedEventHandler(OnIllustrationPropertyChanged), "Illustration", AdventureWorks.Dal.Adapter.v51.RelationClasses.StaticProductModelIllustrationRelations.IllustrationEntityUsingIllustrationIdStatic, true, signalRelatedEntity, "ProductModelIllustrations", resetFKFields, new int[] { (int)ProductModelIllustrationFieldIndex.IllustrationId });
     _illustration = null;
 }