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