public ActionResult DeleteConfirmed(int id)
        {
            ActorComment actorcomment = db.ActorComments.Find(id);

            db.ActorComments.Remove(actorcomment);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "ActorCommentID,ActorID,Comment,DateAdded")] ActorComment actorComment)
 {
     if (ModelState.IsValid)
     {
         db.Entry(actorComment).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.ActorID = new SelectList(db.Actors, "ActorID", "ActorName", actorComment.ActorID);
     return(View(actorComment));
 }
        public ActionResult Create([Bind(Include = "ActorCommentId,ActorId,ActorCommentContent,ActorCommentDateAdded,UserName")] ActorComment actorComment)
        {
            if (ModelState.IsValid)
            {
                db.ActorComments.Add(actorComment);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.ActorId = new SelectList(db.Actors, "ActorId", "ActorFirstName", actorComment.ActorId);
            return(View(actorComment));
        }
        public ActionResult Create([Bind(Include = "ActorCommentID,ActorID,ActorName,UserID,Comment,Posted")] ActorComment actorcomment)
        {
            if (ModelState.IsValid)
            {
                db.ActorComments.Add(actorcomment);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.ActorID = new SelectList(db.Actors, "ActorID", "ActorName", actorcomment.ActorID);
            ViewBag.UserID  = new SelectList(db.Users, "UserID", "UserName", actorcomment.UserID);
            return(View(actorcomment));
        }
        // GET: /ActorComment/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ActorComment actorcomment = db.ActorComments.Find(id);

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

            if (actorComment == null)
            {
                return(HttpNotFound());
            }
            ViewBag.ActorID = new SelectList(db.Actors, "ActorID", "ActorName", actorComment.ActorID);
            return(View(actorComment));
        }