public ActionResult Category(Category obj)
 {
     DataManager db = new DataManager();
     Category old = db.GetCategory(obj.CategoryID);
     UpdateModel(old);
     db.Save();
     return RedirectToAction("List");
 }
        public ActionResult Index()
        {
            DataManager manager = new DataManager();

            ViewData.Model = manager.GetItems();
            ViewBag.Items = manager.GetItems();
            ViewBag.LinkName = "Моя текстовая ссылка";

            ViewBag.Message = "Welcome to ASP.NET MVC!";

            return RedirectToAction("List");
        }
 public ActionResult Edit(Item obj)
 {
     if (ModelState.IsValid)
     {
         DataManager db = new DataManager();
         db.SaveItem(obj);
         return RedirectToAction("Index");
     }
     else
     {
         return View();
     }
 }
 public ActionResult List()
 {
     DataManager db = new DataManager();
     ViewBag.Categories = db.GetCategories();
     return View();
 }
 public ActionResult Edit(Guid id)
 {
     DataManager db = new DataManager();
     return View(db.GetItem(id));
 }
 public ActionResult Category(Guid id)
 {
     DataManager db = new DataManager();
     return View(db.GetCategory(id));
 }