Ejemplo n.º 1
0
 public ActionResult Edit([Bind(Include = "RatingID,Rating,MovieID,UserName")] Rating_tbl rating_tbl)
 {
     if (ModelState.IsValid)
     {
         db.Entry(rating_tbl).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(rating_tbl));
 }
Ejemplo n.º 2
0
        [HttpPost] // Edit Post Method
        public ActionResult Edit(News_tbl news)
        {
            Movie_ReviewDBEntities db = new Movie_ReviewDBEntities();

            if (ModelState.IsValid)
            {
                db.Entry(news).State = EntityState.Modified;
                db.SaveChanges();
                return(RedirectToAction("Index", "News"));
            }
            return(View(news));
        }