コード例 #1
0
ファイル: MenuHelper.cs プロジェクト: jsingh/DeepBlue
 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;
 }