public ActionResult Create(StaticPage page) { if (ModelState.IsValid) { db.StaticPages.Add(page); db.SaveChanges(); return RedirectToAction("Index", page); } return View(page); }
public ActionResult Edit(StaticPage page) { if (ModelState.IsValid) { db.Entry(page).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index", page); } return View(page); }