public ActionResult DeleteConfirmed(int id)
        {
            CastDetail castDetail = db.CastDetails.Find(id);

            db.CastDetails.Remove(castDetail);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "Id,FirstName,LastName,Address,Email,DateOfBirth")] CastDetail castDetail)
 {
     if (ModelState.IsValid)
     {
         db.Entry(castDetail).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(castDetail));
 }
        public ActionResult Create([Bind(Include = "Id,FirstName,LastName,Address,Email,DateOfBirth")] CastDetail castDetail)
        {
            if (ModelState.IsValid)
            {
                db.CastDetails.Add(castDetail);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(castDetail));
        }
 void ReleaseDesignerOutlets()
 {
     if (CastDetail != null)
     {
         CastDetail.Dispose();
         CastDetail = null;
     }
     if (CastPoster != null)
     {
         CastPoster.Dispose();
         CastPoster = null;
     }
 }
        // GET: CastDetails/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            CastDetail castDetail = db.CastDetails.Find(id);

            if (castDetail == null)
            {
                return(HttpNotFound());
            }
            return(View(castDetail));
        }