예제 #1
0
 /// <summary>
 /// 获取顶级分类信息/即:导航菜单
 /// </summary>
 /// <returns></returns>
 public IList<Category> GetMenu()
 {
     IList<Category> list = this.GetAllCache().Where(e => (e.ParentID == "0" && e.Status > 0)).OrderBy(e => e.Status).ToList();
     if (list == null || list.Count < 1)
     {
         using (CategoryDal dal = new CategoryDal())
         {
             list = dal.GetMenu();
         }
     }
     else
     {
         log.Debug("Get navigation from cache !");
     }
     return list;
 }