Inheritance: EntityCollectionNonGeneric
 /// <summary>Gets the member collections queue from the queue (base first)</summary>
 /// <param name="collectionsQueue">The collections queue.</param>
 protected override void GetFromMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue)
 {
     base.GetFromMemberEntityCollectionsQueue(collectionsQueue);
     this._snDiscussionBoardInRoles = (EntityCollection<SnDiscussionBoardInRoleEntity>) collectionsQueue.Dequeue();
     this._snDiscussionBoardModerators = (EntityCollection<SnDiscussionBoardModeratorEntity>) collectionsQueue.Dequeue();
     this._snDiscussionTopics = (EntityCollection<SnDiscussionTopicEntity>) collectionsQueue.Dequeue();
     this._snEvents = (EntityCollection<SnEventEntity>) collectionsQueue.Dequeue();
     this._snRelationships = (EntityCollection<SnRelationshipEntity>) collectionsQueue.Dequeue();
 }
 /// <summary>Gets the member collections queue from the queue (base first)</summary>
 /// <param name="collectionsQueue">The collections queue.</param>
 protected override void GetFromMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue)
 {
     base.GetFromMemberEntityCollectionsQueue(collectionsQueue);
     this._newsCategoryChildrens = (EntityCollection<NewsCategoryEntity>) collectionsQueue.Dequeue();
     this._newsCategoryInRoles = (EntityCollection<NewsCategoryInRoleEntity>) collectionsQueue.Dequeue();
     this._newsCategoryLocalizations = (EntityCollection<NewsCategoryLocalizationEntity>) collectionsQueue.Dequeue();
     this._newsItems = (EntityCollection<NewsItemEntity>) collectionsQueue.Dequeue();
     this._snRelationshipss = (EntityCollection<SnRelationshipEntity>) collectionsQueue.Dequeue();
 }
 protected SnFriendListEntity(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     if(SerializationHelper.Optimization != SerializationOptimization.Fast)
     {
         _snFriendListMembers = (EntityCollection<SnFriendListMemberEntity>)info.GetValue("_snFriendListMembers", typeof(EntityCollection<SnFriendListMemberEntity>));
         _aspnetUser = (AspnetUsersEntity)info.GetValue("_aspnetUser", typeof(AspnetUsersEntity));
         if(_aspnetUser!=null)
         {
             _aspnetUser.AfterSave+=new EventHandler(OnEntityAfterSave);
         }
         this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
     }
     // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
     // __LLBLGENPRO_USER_CODE_REGION_END
 }
 protected SnRelationshipEntity(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     if(SerializationHelper.Optimization != SerializationOptimization.Fast)
     {
         _snComments = (EntityCollection<SnCommentEntity>)info.GetValue("_snComments", typeof(EntityCollection<SnCommentEntity>));
         _snFiles = (EntityCollection<SnFileEntity>)info.GetValue("_snFiles", typeof(EntityCollection<SnFileEntity>));
         _snRatings = (EntityCollection<SnRatingEntity>)info.GetValue("_snRatings", typeof(EntityCollection<SnRatingEntity>));
         _snSubscribers = (EntityCollection<SnSubscriberEntity>)info.GetValue("_snSubscribers", typeof(EntityCollection<SnSubscriberEntity>));
         _snTags = (EntityCollection<SnTagEntity>)info.GetValue("_snTags", typeof(EntityCollection<SnTagEntity>));
         _aspnetApplication = (AspnetApplicationsEntity)info.GetValue("_aspnetApplication", typeof(AspnetApplicationsEntity));
         if(_aspnetApplication!=null)
         {
             _aspnetApplication.AfterSave+=new EventHandler(OnEntityAfterSave);
         }
         _aspnetUser = (AspnetUsersEntity)info.GetValue("_aspnetUser", typeof(AspnetUsersEntity));
         if(_aspnetUser!=null)
         {
             _aspnetUser.AfterSave+=new EventHandler(OnEntityAfterSave);
         }
         _blog = (BlogEntity)info.GetValue("_blog", typeof(BlogEntity));
         if(_blog!=null)
         {
             _blog.AfterSave+=new EventHandler(OnEntityAfterSave);
         }
         _blogPost = (BlogPostEntity)info.GetValue("_blogPost", typeof(BlogPostEntity));
         if(_blogPost!=null)
         {
             _blogPost.AfterSave+=new EventHandler(OnEntityAfterSave);
         }
         _calendarEvent = (CalendarEventEntity)info.GetValue("_calendarEvent", typeof(CalendarEventEntity));
         if(_calendarEvent!=null)
         {
             _calendarEvent.AfterSave+=new EventHandler(OnEntityAfterSave);
         }
         _campaign = (CampaignEntity)info.GetValue("_campaign", typeof(CampaignEntity));
         if(_campaign!=null)
         {
             _campaign.AfterSave+=new EventHandler(OnEntityAfterSave);
         }
         _document = (DocumentEntity)info.GetValue("_document", typeof(DocumentEntity));
         if(_document!=null)
         {
             _document.AfterSave+=new EventHandler(OnEntityAfterSave);
         }
         _listItem = (ListItemEntity)info.GetValue("_listItem", typeof(ListItemEntity));
         if(_listItem!=null)
         {
             _listItem.AfterSave+=new EventHandler(OnEntityAfterSave);
         }
         _newsCategory = (NewsCategoryEntity)info.GetValue("_newsCategory", typeof(NewsCategoryEntity));
         if(_newsCategory!=null)
         {
             _newsCategory.AfterSave+=new EventHandler(OnEntityAfterSave);
         }
         _newsItem = (NewsItemEntity)info.GetValue("_newsItem", typeof(NewsItemEntity));
         if(_newsItem!=null)
         {
             _newsItem.AfterSave+=new EventHandler(OnEntityAfterSave);
         }
         _newsletter = (NewsletterEntity)info.GetValue("_newsletter", typeof(NewsletterEntity));
         if(_newsletter!=null)
         {
             _newsletter.AfterSave+=new EventHandler(OnEntityAfterSave);
         }
         _page = (PageEntity)info.GetValue("_page", typeof(PageEntity));
         if(_page!=null)
         {
             _page.AfterSave+=new EventHandler(OnEntityAfterSave);
         }
         _poll = (PollEntity)info.GetValue("_poll", typeof(PollEntity));
         if(_poll!=null)
         {
             _poll.AfterSave+=new EventHandler(OnEntityAfterSave);
         }
         _snAlbum = (SnAlbumEntity)info.GetValue("_snAlbum", typeof(SnAlbumEntity));
         if(_snAlbum!=null)
         {
             _snAlbum.AfterSave+=new EventHandler(OnEntityAfterSave);
         }
         _snDiscussionBoard = (SnDiscussionBoardEntity)info.GetValue("_snDiscussionBoard", typeof(SnDiscussionBoardEntity));
         if(_snDiscussionBoard!=null)
         {
             _snDiscussionBoard.AfterSave+=new EventHandler(OnEntityAfterSave);
         }
         _snDiscussionMessage = (SnDiscussionMessageEntity)info.GetValue("_snDiscussionMessage", typeof(SnDiscussionMessageEntity));
         if(_snDiscussionMessage!=null)
         {
             _snDiscussionMessage.AfterSave+=new EventHandler(OnEntityAfterSave);
         }
         _snDiscussionTopic = (SnDiscussionTopicEntity)info.GetValue("_snDiscussionTopic", typeof(SnDiscussionTopicEntity));
         if(_snDiscussionTopic!=null)
         {
             _snDiscussionTopic.AfterSave+=new EventHandler(OnEntityAfterSave);
         }
         _snFile = (SnFileEntity)info.GetValue("_snFile", typeof(SnFileEntity));
         if(_snFile!=null)
         {
             _snFile.AfterSave+=new EventHandler(OnEntityAfterSave);
         }
         _snGroup = (SnGroupEntity)info.GetValue("_snGroup", typeof(SnGroupEntity));
         if(_snGroup!=null)
         {
             _snGroup.AfterSave+=new EventHandler(OnEntityAfterSave);
         }
         _snMessage = (SnMessageEntity)info.GetValue("_snMessage", typeof(SnMessageEntity));
         if(_snMessage!=null)
         {
             _snMessage.AfterSave+=new EventHandler(OnEntityAfterSave);
         }
         _snNote = (SnNoteEntity)info.GetValue("_snNote", typeof(SnNoteEntity));
         if(_snNote!=null)
         {
             _snNote.AfterSave+=new EventHandler(OnEntityAfterSave);
         }
         this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
     }
     // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
     // __LLBLGENPRO_USER_CODE_REGION_END
 }
 /// <summary>Gets the member collections queue from the queue (base first)</summary>
 /// <param name="collectionsQueue">The collections queue.</param>
 protected override void GetFromMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue)
 {
     base.GetFromMemberEntityCollectionsQueue(collectionsQueue);
     this._snAlbum = (EntityCollection<SnAlbumEntity>) collectionsQueue.Dequeue();
     this._snDiscussionBoard = (EntityCollection<SnDiscussionBoardEntity>) collectionsQueue.Dequeue();
     this._snEvents = (EntityCollection<SnEventEntity>) collectionsQueue.Dequeue();
     this._snGroupMembers = (EntityCollection<SnGroupMemberEntity>) collectionsQueue.Dequeue();
     this._snGroupRequests = (EntityCollection<SnGroupRequestEntity>) collectionsQueue.Dequeue();
     this._snNotes = (EntityCollection<SnNoteEntity>) collectionsQueue.Dequeue();
     this._snRelationshipss = (EntityCollection<SnRelationshipEntity>) collectionsQueue.Dequeue();
 }
 /// <summary>Gets the member collections queue from the queue (base first)</summary>
 /// <param name="collectionsQueue">The collections queue.</param>
 protected override void GetFromMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue)
 {
     base.GetFromMemberEntityCollectionsQueue(collectionsQueue);
     this._snRelationships = (EntityCollection<SnRelationshipEntity>) collectionsQueue.Dequeue();
 }
 /// <summary>Gets the member collections queue from the queue (base first)</summary>
 /// <param name="collectionsQueue">The collections queue.</param>
 protected override void GetFromMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue)
 {
     base.GetFromMemberEntityCollectionsQueue(collectionsQueue);
     this._adPage = (EntityCollection<AdPageEntity>) collectionsQueue.Dequeue();
 }
 protected NavigationEntity(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     if(SerializationHelper.Optimization != SerializationOptimization.Fast)
     {
         _childNavigationItems = (EntityCollection<NavigationEntity>)info.GetValue("_childNavigationItems", typeof(EntityCollection<NavigationEntity>));
         _navigationLocalizations = (EntityCollection<NavigationLocalizationEntity>)info.GetValue("_navigationLocalizations", typeof(EntityCollection<NavigationLocalizationEntity>));
         _navigationRoles = (EntityCollection<NavigationRoleEntity>)info.GetValue("_navigationRoles", typeof(EntityCollection<NavigationRoleEntity>));
         _aspnetApplication = (AspnetApplicationsEntity)info.GetValue("_aspnetApplication", typeof(AspnetApplicationsEntity));
         if(_aspnetApplication!=null)
         {
             _aspnetApplication.AfterSave+=new EventHandler(OnEntityAfterSave);
         }
         _parentNavigationItem = (NavigationEntity)info.GetValue("_parentNavigationItem", typeof(NavigationEntity));
         if(_parentNavigationItem!=null)
         {
             _parentNavigationItem.AfterSave+=new EventHandler(OnEntityAfterSave);
         }
         _page = (PageEntity)info.GetValue("_page", typeof(PageEntity));
         if(_page!=null)
         {
             _page.AfterSave+=new EventHandler(OnEntityAfterSave);
         }
         this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
     }
     // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
     // __LLBLGENPRO_USER_CODE_REGION_END
 }
 /// <summary>Gets the member collections queue from the queue (base first)</summary>
 /// <param name="collectionsQueue">The collections queue.</param>
 protected override void GetFromMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue)
 {
     base.GetFromMemberEntityCollectionsQueue(collectionsQueue);
     this._childNavigationItems = (EntityCollection<NavigationEntity>) collectionsQueue.Dequeue();
     this._navigationLocalizations = (EntityCollection<NavigationLocalizationEntity>) collectionsQueue.Dequeue();
     this._navigationRoles = (EntityCollection<NavigationRoleEntity>) collectionsQueue.Dequeue();
 }
 /// <summary>Gets the member collections queue from the queue (base first)</summary>
 /// <param name="collectionsQueue">The collections queue.</param>
 protected override void GetFromMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue)
 {
     base.GetFromMemberEntityCollectionsQueue(collectionsQueue);
     this._listItems = (EntityCollection<ListItemEntity>) collectionsQueue.Dequeue();
 }
 /// <summary>Gets the member collections queue from the queue (base first)</summary>
 /// <param name="collectionsQueue">The collections queue.</param>
 protected override void GetFromMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue)
 {
     base.GetFromMemberEntityCollectionsQueue(collectionsQueue);
     this._blogCategory = (EntityCollection<BlogCategoryEntity>) collectionsQueue.Dequeue();
     this._blogEditors = (EntityCollection<BlogEditorEntity>) collectionsQueue.Dequeue();
     this._blogPosts = (EntityCollection<BlogPostEntity>) collectionsQueue.Dequeue();
     this._snRelationships = (EntityCollection<SnRelationshipEntity>) collectionsQueue.Dequeue();
 }
 /// <summary>Gets the member collections queue from the queue (base first)</summary>
 /// <param name="collectionsQueue">The collections queue.</param>
 protected override void GetFromMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue)
 {
     base.GetFromMemberEntityCollectionsQueue(collectionsQueue);
     this._oaTokens = (EntityCollection<OaTokenEntity>) collectionsQueue.Dequeue();
     this._snEvents = (EntityCollection<SnEventEntity>) collectionsQueue.Dequeue();
 }
 protected OaConsumerEntity(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     if(SerializationHelper.Optimization != SerializationOptimization.Fast)
     {
         _oaTokens = (EntityCollection<OaTokenEntity>)info.GetValue("_oaTokens", typeof(EntityCollection<OaTokenEntity>));
         _snEvents = (EntityCollection<SnEventEntity>)info.GetValue("_snEvents", typeof(EntityCollection<SnEventEntity>));
         this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
     }
     // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
     // __LLBLGENPRO_USER_CODE_REGION_END
 }
 /// <summary>Gets the member collections queue from the queue (base first)</summary>
 /// <param name="collectionsQueue">The collections queue.</param>
 protected override void GetFromMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue)
 {
     base.GetFromMemberEntityCollectionsQueue(collectionsQueue);
     this._blogPostCategory = (EntityCollection<BlogPostCategoryEntity>) collectionsQueue.Dequeue();
 }
 /// <summary>Gets the member collections queue from the queue (base first)</summary>
 /// <param name="collectionsQueue">The collections queue.</param>
 protected override void GetFromMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue)
 {
     base.GetFromMemberEntityCollectionsQueue(collectionsQueue);
     this._calendarEvents = (EntityCollection<CalendarEventEntity>) collectionsQueue.Dequeue();
 }
 protected DocumentEntity(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     if(SerializationHelper.Optimization != SerializationOptimization.Fast)
     {
         _snRelationships = (EntityCollection<SnRelationshipEntity>)info.GetValue("_snRelationships", typeof(EntityCollection<SnRelationshipEntity>));
         _aspnetUsers = (AspnetUsersEntity)info.GetValue("_aspnetUsers", typeof(AspnetUsersEntity));
         if(_aspnetUsers!=null)
         {
             _aspnetUsers.AfterSave+=new EventHandler(OnEntityAfterSave);
         }
         _language = (LanguageEntity)info.GetValue("_language", typeof(LanguageEntity));
         if(_language!=null)
         {
             _language.AfterSave+=new EventHandler(OnEntityAfterSave);
         }
         _page = (PageEntity)info.GetValue("_page", typeof(PageEntity));
         if(_page!=null)
         {
             _page.AfterSave+=new EventHandler(OnEntityAfterSave);
         }
         this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
     }
     // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
     // __LLBLGENPRO_USER_CODE_REGION_END
 }
 protected SnDiscussionMessageEntity(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     if(SerializationHelper.Optimization != SerializationOptimization.Fast)
     {
         _snRelationships = (EntityCollection<SnRelationshipEntity>)info.GetValue("_snRelationships", typeof(EntityCollection<SnRelationshipEntity>));
         _adminAttentionReportedByUser = (AspnetUsersEntity)info.GetValue("_adminAttentionReportedByUser", typeof(AspnetUsersEntity));
         if(_adminAttentionReportedByUser!=null)
         {
             _adminAttentionReportedByUser.AfterSave+=new EventHandler(OnEntityAfterSave);
         }
         _aspnetUser = (AspnetUsersEntity)info.GetValue("_aspnetUser", typeof(AspnetUsersEntity));
         if(_aspnetUser!=null)
         {
             _aspnetUser.AfterSave+=new EventHandler(OnEntityAfterSave);
         }
         _deleteRequestedByUser = (AspnetUsersEntity)info.GetValue("_deleteRequestedByUser", typeof(AspnetUsersEntity));
         if(_deleteRequestedByUser!=null)
         {
             _deleteRequestedByUser.AfterSave+=new EventHandler(OnEntityAfterSave);
         }
         _pinnedByUser = (AspnetUsersEntity)info.GetValue("_pinnedByUser", typeof(AspnetUsersEntity));
         if(_pinnedByUser!=null)
         {
             _pinnedByUser.AfterSave+=new EventHandler(OnEntityAfterSave);
         }
         _snDiscussionTopic = (SnDiscussionTopicEntity)info.GetValue("_snDiscussionTopic", typeof(SnDiscussionTopicEntity));
         if(_snDiscussionTopic!=null)
         {
             _snDiscussionTopic.AfterSave+=new EventHandler(OnEntityAfterSave);
         }
         this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
     }
     // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
     // __LLBLGENPRO_USER_CODE_REGION_END
 }
        /// <summary>
        /// Retrieves a list of groups matching the criteria specified via method parameters.
        /// </summary>
        /// <param name="category">Category name.</param>
        /// <param name="categoryId">Category Id</param>
        /// <param name="pageNumber">Page number.</param>
        /// <param name="pageSize">Page size.</param>
        /// <param name="recordCount">Record count.</param>
        /// <returns>List of groups.</returns>
        public List<MonoSoftware.MonoX.Repositories.SnGroupDTO> GetPopularGroups(string category, Guid categoryId, int pageNumber, int pageSize, out int recordCount)
        {
            RelationPredicateBucket filter = new RelationPredicateBucket();

            //introduced to filter out groups by languages and applications
            filter.Relations.Add(SnGroupEntity.Relations.SnGroupCategoryEntityUsingGroupCategoryId, JoinHint.Left);
            //Note: MonoX supports the multi application environment so general filter for all DB access calls should contain the application id filter
            filter.PredicateExpression.Add(SnGroupCategoryFields.ApplicationId == MonoSoftware.MonoX.Repositories.MembershipRepository.GetInstance().GetApplicationId());
            //Note: MonoX in supports the multi language environment so general filter for all DB access calls should contain the language id filter
            filter.PredicateExpression.Add(SnGroupCategoryFields.LanguageId == LocalizationUtility.GetCurrentLanguageId());

            //Filter groups by category
            if (categoryId != Guid.Empty)
            {
                filter.PredicateExpression.Add(SnGroupFields.GroupCategoryId == categoryId);
            }
            if (!String.IsNullOrEmpty(category))
            {
                filter.PredicateExpression.Add(SnGroupCategoryFields.Slug == category);
            }

            IPrefetchPath2 prefetch = new PrefetchPath2((int)EntityType.SnGroupEntity);
            prefetch.Add(SnGroupEntity.PrefetchPathSnGroupCategory);
            //Fetch a record from the members table only for the current user so his status could be read
            Guid uid = SecurityUtility.GetUserId();
            if (!Guid.Empty.Equals(uid))
            {
                PredicateExpression memberFilter = new PredicateExpression(SnGroupMemberFields.UserId == uid);
                prefetch.Add(SnGroupEntity.PrefetchPathSnGroupMembers, 1, memberFilter);
            }

            #region Popular groups sorter
            const string memberCountField = "MemberCountField";
            const string memberCountTableName = "MemberCountTable";

            EntityFields2 memberFields = new EntityFields2(2);
            memberFields.DefineField(SnGroupMemberFields.GroupId, 0);
            memberFields.DefineField(SnGroupMemberFields.Id, 1, memberCountField, AggregateFunction.Count);
            DerivedTableDefinition memberCountTable = new DerivedTableDefinition(memberFields, memberCountTableName, null, new GroupByCollection(memberFields[0]));

            IDynamicRelation memberCountRelation = new DynamicRelation(memberCountTable, JoinHint.Right, MonoSoftware.MonoX.DAL.EntityType.SnGroupEntity, String.Empty, SnGroupMemberFields.GroupId.SetObjectAlias(memberCountTable.Alias) == SnGroupFields.Id);
            filter.Relations.Add(memberCountRelation);

            ISortExpression sorter = new SortExpression(new SortClause(new EntityField2(memberCountField, null).SetObjectAlias(memberCountTableName), null, SortOperator.Descending));
            #endregion

            EntityCollection<SnGroupEntity> groups = new EntityCollection<SnGroupEntity>();
            //Fetch the group collection
            FetchEntityCollection(groups, filter, 0, sorter, prefetch, pageNumber, pageSize);
            //Fetch the group total count used by paging
            recordCount = GetDbCount(groups, filter);
            //Transfer group entities to the DTO
            List<MonoSoftware.MonoX.Repositories.SnGroupDTO> toReturn = groups.Select(group => new MonoSoftware.MonoX.Repositories.SnGroupDTO(group)).ToList<MonoSoftware.MonoX.Repositories.SnGroupDTO>();
            return toReturn;
        }
 protected AdEntity(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     if(SerializationHelper.Optimization != SerializationOptimization.Fast)
     {
         _adPage = (EntityCollection<AdPageEntity>)info.GetValue("_adPage", typeof(EntityCollection<AdPageEntity>));
         _campaign = (CampaignEntity)info.GetValue("_campaign", typeof(CampaignEntity));
         if(_campaign!=null)
         {
             _campaign.AfterSave+=new EventHandler(OnEntityAfterSave);
         }
         this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
     }
     // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
     // __LLBLGENPRO_USER_CODE_REGION_END
 }
 protected SnAlbumEntity(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     if(SerializationHelper.Optimization != SerializationOptimization.Fast)
     {
         _snEvents = (EntityCollection<SnEventEntity>)info.GetValue("_snEvents", typeof(EntityCollection<SnEventEntity>));
         _snFiles = (EntityCollection<SnFileEntity>)info.GetValue("_snFiles", typeof(EntityCollection<SnFileEntity>));
         _snRelationships = (EntityCollection<SnRelationshipEntity>)info.GetValue("_snRelationships", typeof(EntityCollection<SnRelationshipEntity>));
         _aspnetApplications = (AspnetApplicationsEntity)info.GetValue("_aspnetApplications", typeof(AspnetApplicationsEntity));
         if(_aspnetApplications!=null)
         {
             _aspnetApplications.AfterSave+=new EventHandler(OnEntityAfterSave);
         }
         _aspnetUser = (AspnetUsersEntity)info.GetValue("_aspnetUser", typeof(AspnetUsersEntity));
         if(_aspnetUser!=null)
         {
             _aspnetUser.AfterSave+=new EventHandler(OnEntityAfterSave);
         }
         _language = (LanguageEntity)info.GetValue("_language", typeof(LanguageEntity));
         if(_language!=null)
         {
             _language.AfterSave+=new EventHandler(OnEntityAfterSave);
         }
         _privacyLevel = (PrivacyLevelEntity)info.GetValue("_privacyLevel", typeof(PrivacyLevelEntity));
         if(_privacyLevel!=null)
         {
             _privacyLevel.AfterSave+=new EventHandler(OnEntityAfterSave);
         }
         _snGroup = (SnGroupEntity)info.GetValue("_snGroup", typeof(SnGroupEntity));
         if(_snGroup!=null)
         {
             _snGroup.AfterSave+=new EventHandler(OnEntityAfterSave);
         }
         this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
     }
     // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
     // __LLBLGENPRO_USER_CODE_REGION_END
 }
 /// <summary>Gets the member collections queue from the queue (base first)</summary>
 /// <param name="collectionsQueue">The collections queue.</param>
 protected override void GetFromMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue)
 {
     base.GetFromMemberEntityCollectionsQueue(collectionsQueue);
     this._aspnetPersonalizationPerUser = (EntityCollection<AspnetPersonalizationPerUserEntity>) collectionsQueue.Dequeue();
 }
 protected BlogPostEntity(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     if(SerializationHelper.Optimization != SerializationOptimization.Fast)
     {
         _blogPostCategories = (EntityCollection<BlogPostCategoryEntity>)info.GetValue("_blogPostCategories", typeof(EntityCollection<BlogPostCategoryEntity>));
         _blogPostRoles = (EntityCollection<BlogPostRoleEntity>)info.GetValue("_blogPostRoles", typeof(EntityCollection<BlogPostRoleEntity>));
         _snEvents = (EntityCollection<SnEventEntity>)info.GetValue("_snEvents", typeof(EntityCollection<SnEventEntity>));
         _snRelationships = (EntityCollection<SnRelationshipEntity>)info.GetValue("_snRelationships", typeof(EntityCollection<SnRelationshipEntity>));
         _aspnetUser = (AspnetUsersEntity)info.GetValue("_aspnetUser", typeof(AspnetUsersEntity));
         if(_aspnetUser!=null)
         {
             _aspnetUser.AfterSave+=new EventHandler(OnEntityAfterSave);
         }
         _blog = (BlogEntity)info.GetValue("_blog", typeof(BlogEntity));
         if(_blog!=null)
         {
             _blog.AfterSave+=new EventHandler(OnEntityAfterSave);
         }
         this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
     }
     // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
     // __LLBLGENPRO_USER_CODE_REGION_END
 }
 /// <summary>Gets the member collections queue from the queue (base first)</summary>
 /// <param name="collectionsQueue">The collections queue.</param>
 protected override void GetFromMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue)
 {
     base.GetFromMemberEntityCollectionsQueue(collectionsQueue);
     this._snComments = (EntityCollection<SnCommentEntity>) collectionsQueue.Dequeue();
     this._snFiles = (EntityCollection<SnFileEntity>) collectionsQueue.Dequeue();
     this._snRatings = (EntityCollection<SnRatingEntity>) collectionsQueue.Dequeue();
     this._snSubscribers = (EntityCollection<SnSubscriberEntity>) collectionsQueue.Dequeue();
     this._snTags = (EntityCollection<SnTagEntity>) collectionsQueue.Dequeue();
 }
 /// <summary>Gets the member collections queue from the queue (base first)</summary>
 /// <param name="collectionsQueue">The collections queue.</param>
 protected override void GetFromMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue)
 {
     base.GetFromMemberEntityCollectionsQueue(collectionsQueue);
     this._blogPostCategories = (EntityCollection<BlogPostCategoryEntity>) collectionsQueue.Dequeue();
     this._blogPostRoles = (EntityCollection<BlogPostRoleEntity>) collectionsQueue.Dequeue();
     this._snEvents = (EntityCollection<SnEventEntity>) collectionsQueue.Dequeue();
     this._snRelationships = (EntityCollection<SnRelationshipEntity>) collectionsQueue.Dequeue();
 }
 protected SnGroupEntity(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     if(SerializationHelper.Optimization != SerializationOptimization.Fast)
     {
         _snAlbum = (EntityCollection<SnAlbumEntity>)info.GetValue("_snAlbum", typeof(EntityCollection<SnAlbumEntity>));
         _snDiscussionBoard = (EntityCollection<SnDiscussionBoardEntity>)info.GetValue("_snDiscussionBoard", typeof(EntityCollection<SnDiscussionBoardEntity>));
         _snEvents = (EntityCollection<SnEventEntity>)info.GetValue("_snEvents", typeof(EntityCollection<SnEventEntity>));
         _snGroupMembers = (EntityCollection<SnGroupMemberEntity>)info.GetValue("_snGroupMembers", typeof(EntityCollection<SnGroupMemberEntity>));
         _snGroupRequests = (EntityCollection<SnGroupRequestEntity>)info.GetValue("_snGroupRequests", typeof(EntityCollection<SnGroupRequestEntity>));
         _snNotes = (EntityCollection<SnNoteEntity>)info.GetValue("_snNotes", typeof(EntityCollection<SnNoteEntity>));
         _snRelationshipss = (EntityCollection<SnRelationshipEntity>)info.GetValue("_snRelationshipss", typeof(EntityCollection<SnRelationshipEntity>));
         _aspnetUser = (AspnetUsersEntity)info.GetValue("_aspnetUser", typeof(AspnetUsersEntity));
         if(_aspnetUser!=null)
         {
             _aspnetUser.AfterSave+=new EventHandler(OnEntityAfterSave);
         }
         _snGroupCategory = (SnGroupCategoryEntity)info.GetValue("_snGroupCategory", typeof(SnGroupCategoryEntity));
         if(_snGroupCategory!=null)
         {
             _snGroupCategory.AfterSave+=new EventHandler(OnEntityAfterSave);
         }
         this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
     }
     // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
     // __LLBLGENPRO_USER_CODE_REGION_END
 }
 protected CampaignEntity(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     if(SerializationHelper.Optimization != SerializationOptimization.Fast)
     {
         _ad = (EntityCollection<AdEntity>)info.GetValue("_ad", typeof(EntityCollection<AdEntity>));
         _snRelationshipss = (EntityCollection<SnRelationshipEntity>)info.GetValue("_snRelationshipss", typeof(EntityCollection<SnRelationshipEntity>));
         _aspnetApplications = (AspnetApplicationsEntity)info.GetValue("_aspnetApplications", typeof(AspnetApplicationsEntity));
         if(_aspnetApplications!=null)
         {
             _aspnetApplications.AfterSave+=new EventHandler(OnEntityAfterSave);
         }
         this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
     }
     // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
     // __LLBLGENPRO_USER_CODE_REGION_END
 }
 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
 }
 protected CalendarEventRecurringDefinitionEntity(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     if(SerializationHelper.Optimization != SerializationOptimization.Fast)
     {
         _calendarEvents = (EntityCollection<CalendarEventEntity>)info.GetValue("_calendarEvents", typeof(EntityCollection<CalendarEventEntity>));
         _calendarEventRecurringDefinitionType = (CalendarEventRecurringDefinitionTypeEntity)info.GetValue("_calendarEventRecurringDefinitionType", typeof(CalendarEventRecurringDefinitionTypeEntity));
         if(_calendarEventRecurringDefinitionType!=null)
         {
             _calendarEventRecurringDefinitionType.AfterSave+=new EventHandler(OnEntityAfterSave);
         }
         this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
     }
     // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
     // __LLBLGENPRO_USER_CODE_REGION_END
 }
 /// <summary>Gets the member collections queue from the queue (base first)</summary>
 /// <param name="collectionsQueue">The collections queue.</param>
 protected override void GetFromMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue)
 {
     base.GetFromMemberEntityCollectionsQueue(collectionsQueue);
     this._snFriendListMembers = (EntityCollection<SnFriendListMemberEntity>) collectionsQueue.Dequeue();
 }
 /// <summary>Gets the member collections queue from the queue (base first)</summary>
 /// <param name="collectionsQueue">The collections queue.</param>
 protected override void GetFromMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue)
 {
     base.GetFromMemberEntityCollectionsQueue(collectionsQueue);
     this._adPage = (EntityCollection<AdPageEntity>) collectionsQueue.Dequeue();
     this._documents = (EntityCollection<DocumentEntity>) collectionsQueue.Dequeue();
     this._navigationItems = (EntityCollection<NavigationEntity>) collectionsQueue.Dequeue();
     this._pageEditRoles = (EntityCollection<PageEditRoleEntity>) collectionsQueue.Dequeue();
     this._pageLocalizations = (EntityCollection<PageLocalizationEntity>) collectionsQueue.Dequeue();
     this._pageRoles = (EntityCollection<PageRoleEntity>) collectionsQueue.Dequeue();
     this._snRelationshipss = (EntityCollection<SnRelationshipEntity>) collectionsQueue.Dequeue();
 }