public ActionResult DeleteConfirmed(int id) { ArtistConcert artistConcert = db.ArtistConcerts.Find(id); db.ArtistConcerts.Remove(artistConcert); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ArtistConcertID,ArtistID,ConcertID")] ArtistConcert artistConcert) { if (ModelState.IsValid) { db.Entry(artistConcert).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.ArtistID = new SelectList(db.Artists, "Id", "StageName", artistConcert.ArtistID); ViewBag.ConcertID = new SelectList(db.Concerts, "ConcertID", "Name", artistConcert.ConcertID); return(View(artistConcert)); }
// GET: ArtistConcerts/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ArtistConcert artistConcert = db.ArtistConcerts.Find(id); if (artistConcert == null) { return(HttpNotFound()); } return(View(artistConcert)); }
// GET: ArtistConcerts/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ArtistConcert artistConcert = db.ArtistConcerts.Find(id); if (artistConcert == null) { return(HttpNotFound()); } ViewBag.ArtistID = new SelectList(db.Artists, "Id", "StageName", artistConcert.ArtistID); ViewBag.ConcertID = new SelectList(db.Concerts, "ConcertID", "Name", artistConcert.ConcertID); return(View(artistConcert)); }