Esempio n. 1
0
 public ActionResult Edit(FAQEntry faqentry)
 {
     if (ModelState.IsValid)
     {
         _context.Entry(faqentry).State = EntityState.Modified;
         _context.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(faqentry);
 }
Esempio n. 2
0
        public ActionResult Create(FAQEntry faqentry)
        {
            if (ModelState.IsValid)
            {
                _context.FAQs.Add(faqentry);
                _context.SaveChanges();
                return RedirectToAction("Index");  
            }

            return View(faqentry);
        }