コード例 #1
0
        // GET: CatagoryEditor
        public ActionResult Index()
        {
            CategoriesLogic ct         = new CategoriesLogic();
            var             categories = ct.GetCategories();

            return(this.View(categories));
        }
コード例 #2
0
        // GET: CatagoryEditor/Edit/5
        public ActionResult Edit(int id)
        {
            CategoriesLogic       ct             = new CategoriesLogic();
            List <CategoryEditor> catEditors     = ct.GetCategories();
            CategoryEditor        editedCategory = catEditors.Single(c => c.Id == id);

            return(View(editedCategory));
        }