public ActionResult Edit(Faq faq) { if (ModelState.IsValid) { faq.LastUpdated = DateTime.Now; faqService.Update(faq); faqService.Commit(); SuccessMessage(FormMessages.SaveSuccess); return RedirectToAction("Index"); } return View(faq); }
public ActionResult Create(Faq @faq) { if (ModelState.IsValid) { faqService.Insert(@faq); faqService.Commit(); SuccessMessage(FormMessages.SaveSuccess); return RedirectToAction("Index"); } return View(@faq); }