예제 #1
0
 public static List<EntityMenuModel> GetMenus()
 {
     List<EntityMenuModel> menus = null;
     if (Authentication.CurrentEntity != null) {
         string key = string.Format(ENTITYMENUKEY, Authentication.CurrentEntity.EntityID);
         ICacheManager cacheManager = new MemoryCacheManager();
         menus = cacheManager.Get(key, () => {
             IAdminRepository adminRepository = new AdminRepository();
             return adminRepository.GetAllEntityMenus();
         });
     } else {
         menus = new List<EntityMenuModel>();
     }
     return menus;
 }