// // 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); }
public static void UpdateCategories() { CategoryService service = new CategoryService(); categories = service.GetCategories(string.Empty); }