public virtual IEnumerable <IProductCategoryState> GetChildProductCategories(string productCategoryId) { IProductCategoryState productCategoryState = CurrentSession.Get <ProductCategoryState>(productCategoryId); if (productCategoryState == null) { return(null); } var criteria = CurrentSession.CreateCriteria <ProductCategoryState>(); var partIdCondition = NHibernateRestrictions.Conjunction() .Add(NHibernateRestrictions.Eq("PrimaryParentCategoryId", productCategoryState.ProductCategoryId)) ; return(criteria.Add(partIdCondition).List <ProductCategoryState>()); }