// GET: CatagoryEditor public ActionResult Index() { CategoriesLogic ct = new CategoriesLogic(); var categories = ct.GetCategories(); return(this.View(categories)); }
// 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)); }