/// <summary> Initializes the class members</summary>
        private void InitClassMembers()
        {
            _categories = new ProductSearchEngine.CollectionClasses.CategoryCollection();
            _categories.SetContainingEntityInfo(this, "Category");

            _products = new ProductSearchEngine.CollectionClasses.ProductCollection();
            _products.SetContainingEntityInfo(this, "Category");
            _categoryReturnsNewIfNotFound = false;
            PerformDependencyInjection();

            // __LLBLGENPRO_USER_CODE_REGION_START InitClassMembers
            // __LLBLGENPRO_USER_CODE_REGION_END
            OnInitClassMembersComplete();
        }
        /// <summary>Private CTor for deserialization</summary>
        /// <param name="info"></param>
        /// <param name="context"></param>
        protected CategoryEntity(SerializationInfo info, StreamingContext context)
            : base(info, context)
        {
            _categories = (ProductSearchEngine.CollectionClasses.CategoryCollection)info.GetValue("_categories", typeof(ProductSearchEngine.CollectionClasses.CategoryCollection));
            _alwaysFetchCategories = info.GetBoolean("_alwaysFetchCategories");
            _alreadyFetchedCategories = info.GetBoolean("_alreadyFetchedCategories");

            _products = (ProductSearchEngine.CollectionClasses.ProductCollection)info.GetValue("_products", typeof(ProductSearchEngine.CollectionClasses.ProductCollection));
            _alwaysFetchProducts = info.GetBoolean("_alwaysFetchProducts");
            _alreadyFetchedProducts = info.GetBoolean("_alreadyFetchedProducts");
            _category = (CategoryEntity)info.GetValue("_category", typeof(CategoryEntity));
            if(_category!=null)
            {
                _category.AfterSave+=new EventHandler(OnEntityAfterSave);
            }
            _categoryReturnsNewIfNotFound = info.GetBoolean("_categoryReturnsNewIfNotFound");
            _alwaysFetchCategory = info.GetBoolean("_alwaysFetchCategory");
            _alreadyFetchedCategory = info.GetBoolean("_alreadyFetchedCategory");
            this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance(), PersistenceInfoProviderSingleton.GetInstance());
            // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
            // __LLBLGENPRO_USER_CODE_REGION_END
        }