예제 #1
0
        public IList<Category> GetByParentID(string parentID)
        {
            if (string.IsNullOrEmpty(parentID))
            {
                return null;
            }

            IList<Category> list = GetAllCache().Where(x => x.ParentID == parentID).Where(e => e.Status > -1).ToList();

            if (list == null || list.Count < 1)
            {
                using (CategoryDal dal = new CategoryDal())
                {
                    list = dal.GetByParentID(parentID);
                }
            }
            return list;
        }