/// <summary> Removes the sync logic for member _newsCategoryTemplate</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 DesetupSyncNewsCategoryTemplate(bool signalRelatedEntity, bool resetFKFields)
 {
     this.PerformDesetupSyncRelatedEntity( _newsCategoryTemplate, new PropertyChangedEventHandler( OnNewsCategoryTemplatePropertyChanged ), "NewsCategoryTemplate", MonoSoftware.MonoX.DAL.RelationClasses.StaticNewsCategoryRelations.NewsCategoryTemplateEntityUsingIdStatic, false, signalRelatedEntity, "NewsCategory", false, new int[] { (int)NewsCategoryFieldIndex.Id } );
     _newsCategoryTemplate = null;
 }
 /// <summary> setups the sync logic for member _newsCategoryTemplate</summary>
 /// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
 private void SetupSyncNewsCategoryTemplate(IEntityCore relatedEntity)
 {
     if(_newsCategoryTemplate!=relatedEntity)
     {
         DesetupSyncNewsCategoryTemplate(true, true);
         _newsCategoryTemplate = (NewsCategoryTemplateEntity)relatedEntity;
         this.PerformSetupSyncRelatedEntity( _newsCategoryTemplate, new PropertyChangedEventHandler( OnNewsCategoryTemplatePropertyChanged ), "NewsCategoryTemplate", MonoSoftware.MonoX.DAL.RelationClasses.StaticNewsCategoryRelations.NewsCategoryTemplateEntityUsingIdStatic, false, new string[] {  } );
     }
 }
 protected NewsCategoryEntity(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     if(SerializationHelper.Optimization != SerializationOptimization.Fast)
     {
         _newsCategoryChildrens = (EntityCollection<NewsCategoryEntity>)info.GetValue("_newsCategoryChildrens", typeof(EntityCollection<NewsCategoryEntity>));
         _newsCategoryInRoles = (EntityCollection<NewsCategoryInRoleEntity>)info.GetValue("_newsCategoryInRoles", typeof(EntityCollection<NewsCategoryInRoleEntity>));
         _newsCategoryLocalizations = (EntityCollection<NewsCategoryLocalizationEntity>)info.GetValue("_newsCategoryLocalizations", typeof(EntityCollection<NewsCategoryLocalizationEntity>));
         _newsItems = (EntityCollection<NewsItemEntity>)info.GetValue("_newsItems", typeof(EntityCollection<NewsItemEntity>));
         _snRelationshipss = (EntityCollection<SnRelationshipEntity>)info.GetValue("_snRelationshipss", typeof(EntityCollection<SnRelationshipEntity>));
         _aspnetApplications = (AspnetApplicationsEntity)info.GetValue("_aspnetApplications", typeof(AspnetApplicationsEntity));
         if(_aspnetApplications!=null)
         {
             _aspnetApplications.AfterSave+=new EventHandler(OnEntityAfterSave);
         }
         _newsCategoryParent = (NewsCategoryEntity)info.GetValue("_newsCategoryParent", typeof(NewsCategoryEntity));
         if(_newsCategoryParent!=null)
         {
             _newsCategoryParent.AfterSave+=new EventHandler(OnEntityAfterSave);
         }
         _newsCategoryTemplate = (NewsCategoryTemplateEntity)info.GetValue("_newsCategoryTemplate", typeof(NewsCategoryTemplateEntity));
         if(_newsCategoryTemplate!=null)
         {
             _newsCategoryTemplate.AfterSave+=new EventHandler(OnEntityAfterSave);
         }
         this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
     }
     // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
     // __LLBLGENPRO_USER_CODE_REGION_END
 }