public ActionResult DeleteConfirmed(int id)
        {
            CastMusical castMusical = db.CastMusical.Find(id);

            db.CastMusical.Remove(castMusical);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "ID,MusicalFK,CastFK,Character")] CastMusical castMusical)
 {
     if (ModelState.IsValid)
     {
         db.Entry(castMusical).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.CastFK    = new SelectList(db.Actor, "ID_Actor", "Name", castMusical.CastFK);
     ViewBag.MusicalFK = new SelectList(db.Musical, "ID_Musical", "Title", castMusical.MusicalFK);
     return(View(castMusical));
 }
        // GET: CastMusicals/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            CastMusical castMusical = db.CastMusical.Find(id);

            if (castMusical == null)
            {
                return(HttpNotFound());
            }
            return(View(castMusical));
        }
        // GET: CastMusicals/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            CastMusical castMusical = db.CastMusical.Find(id);

            if (castMusical == null)
            {
                return(HttpNotFound());
            }
            ViewBag.CastFK    = new SelectList(db.Actor, "ID_Actor", "Name", castMusical.CastFK);
            ViewBag.MusicalFK = new SelectList(db.Musical, "ID_Musical", "Title", castMusical.MusicalFK);
            return(View(castMusical));
        }