/// <summary> setups the sync logic for member _culture</summary> /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param> private void SetupSyncCulture(IEntityCore relatedEntity) { if (_culture != relatedEntity) { DesetupSyncCulture(true, true); _culture = (CultureEntity)relatedEntity; this.PerformSetupSyncRelatedEntity(_culture, new PropertyChangedEventHandler(OnCulturePropertyChanged), "Culture", AdventureWorks.Dal.Adapter.v42.RelationClasses.StaticProductModelProductDescriptionCultureRelations.CultureEntityUsingCultureIdStatic, true, new string[] { }); } }
protected ProductModelProductDescriptionCultureEntity(SerializationInfo info, StreamingContext context) : base(info, context) { if (SerializationHelper.Optimization != SerializationOptimization.Fast) { _culture = (CultureEntity)info.GetValue("_culture", typeof(CultureEntity)); if (_culture != null) { _culture.AfterSave += new EventHandler(OnEntityAfterSave); } _productDescription = (ProductDescriptionEntity)info.GetValue("_productDescription", typeof(ProductDescriptionEntity)); if (_productDescription != null) { _productDescription.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 _culture</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 DesetupSyncCulture(bool signalRelatedEntity, bool resetFKFields) { this.PerformDesetupSyncRelatedEntity(_culture, new PropertyChangedEventHandler(OnCulturePropertyChanged), "Culture", AdventureWorks.Dal.Adapter.v42.RelationClasses.StaticProductModelProductDescriptionCultureRelations.CultureEntityUsingCultureIdStatic, true, signalRelatedEntity, "ProductModelProductDescriptionCultures", resetFKFields, new int[] { (int)ProductModelProductDescriptionCultureFieldIndex.CultureId }); _culture = null; }
/// <summary> setups the sync logic for member _culture</summary> /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param> private void SetupSyncCulture(IEntityCore relatedEntity) { if(_culture!=relatedEntity) { DesetupSyncCulture(true, true); _culture = (CultureEntity)relatedEntity; this.PerformSetupSyncRelatedEntity( _culture, new PropertyChangedEventHandler( OnCulturePropertyChanged ), "Culture", AdventureWorks.Dal.Adapter.v42.RelationClasses.StaticProductModelProductDescriptionCultureRelations.CultureEntityUsingCultureIdStatic, true, new string[] { } ); } }
/// <summary> Removes the sync logic for member _culture</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 DesetupSyncCulture(bool signalRelatedEntity, bool resetFKFields) { this.PerformDesetupSyncRelatedEntity( _culture, new PropertyChangedEventHandler( OnCulturePropertyChanged ), "Culture", AdventureWorks.Dal.Adapter.v42.RelationClasses.StaticProductModelProductDescriptionCultureRelations.CultureEntityUsingCultureIdStatic, true, signalRelatedEntity, "ProductModelProductDescriptionCultures", resetFKFields, new int[] { (int)ProductModelProductDescriptionCultureFieldIndex.CultureId } ); _culture = null; }
protected ProductModelProductDescriptionCultureEntity(SerializationInfo info, StreamingContext context) : base(info, context) { if(SerializationHelper.Optimization != SerializationOptimization.Fast) { _culture = (CultureEntity)info.GetValue("_culture", typeof(CultureEntity)); if(_culture!=null) { _culture.AfterSave+=new EventHandler(OnEntityAfterSave); } _productDescription = (ProductDescriptionEntity)info.GetValue("_productDescription", typeof(ProductDescriptionEntity)); if(_productDescription!=null) { _productDescription.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 }