コード例 #1
0
ファイル: CategoryController.cs プロジェクト: Oldsooh/XGDG
        //
        // GET: /Admin/Category/
        public ActionResult Index()
        {
            if (Session["UserId"] == null)
            {
                return Redirect("/admin/login");
            }

            CategoryModel model = new CategoryModel();

            CategoryService categoryService = new CategoryService();
            model.Categories = categoryService.GetCategories(null);

            return View(model);
        }
コード例 #2
0
ファイル: Cache.cs プロジェクト: Oldsooh/XGDG
 public static void UpdateCategories()
 {
     CategoryService service = new CategoryService();
     categories = service.GetCategories(string.Empty);
 }