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