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