public ActionResult Create([Bind(Include = "Id,Name,Formed")] Band band) { if (ModelState.IsValid) { db.Bands.Add(band); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(band)); }
public ActionResult Create([Bind(Include = "Id,BandId,Title,ReleaseDate")] Album album) { if (ModelState.IsValid) { db.Albums.Add(album); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(album)); }
public ActionResult Create([Bind(Include = "Id,AlbumId,Title,Length")] Track track) { if (ModelState.IsValid) { db.Tracks.Add(track); db.SaveChanges(); return(RedirectToAction("Index", "Album")); } return(RedirectToAction("Index", "Album")); }