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