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