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