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