Пример #1
0
 public ActionResult Edit(FAQ faq)
 {
     using (var fm = new FAQManager())
     {
         faq = fm.Edit(faq);
     }
     return RedirectToAction("List");
 }
Пример #2
0
 public ActionResult Edit(int id)
 {
     using (var fm = new FAQManager())
     {
         var faq = fm.Single(id);
         ViewBag.FAQ = faq;
     }
     return View("Edit");
 }
Пример #3
0
        public ActionResult List()
        {
            List<FAQ> faqs;

            using (var fm = new FAQManager())
            {
                faqs = fm.All().ToList();
            }

            ViewBag.FAQs = faqs;
            return View("FAQList");
        }