Beispiel #1
0
 /// <summary> setups the sync logic for member _productModel</summary>
 /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
 private void SetupSyncProductModel(IEntityCore relatedEntity)
 {
     if (_productModel != relatedEntity)
     {
         DesetupSyncProductModel(true, true);
         _productModel = (ProductModelEntity)relatedEntity;
         this.PerformSetupSyncRelatedEntity(_productModel, new PropertyChangedEventHandler(OnProductModelPropertyChanged), "ProductModel", AdventureWorks.Dal.Adapter.v51.RelationClasses.StaticProductModelProductDescriptionCultureRelations.ProductModelEntityUsingProductModelIdStatic, 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
 }
Beispiel #3
0
 /// <summary> Removes the sync logic for member _productModel</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 DesetupSyncProductModel(bool signalRelatedEntity, bool resetFKFields)
 {
     this.PerformDesetupSyncRelatedEntity(_productModel, new PropertyChangedEventHandler(OnProductModelPropertyChanged), "ProductModel", AdventureWorks.Dal.Adapter.v51.RelationClasses.StaticProductModelProductDescriptionCultureRelations.ProductModelEntityUsingProductModelIdStatic, true, signalRelatedEntity, "ProductModelProductDescriptionCultures", resetFKFields, new int[] { (int)ProductModelProductDescriptionCultureFieldIndex.ProductModelId });
     _productModel = null;
 }