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