public ActionResult CreateLevel([Bind(Include = "ID,title")] certificates_levels level) { if (ModelState.IsValid) { db.certificates_levels.Add(level); db.SaveChanges(); } return(RedirectToAction("Levels")); }
public ActionResult EditLevel([Bind(Include = "ID,title")] certificates_levels level) { if (ModelState.IsValid) { db.Entry <certificates_levels>(level).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Levels")); } return(View(level)); }