コード例 #1
0
 public ActionResult Edit(Genre genre)
 {
     // Take the genre that we got from our Edit view(thisGenre)
     // Update that information using a form
     _db.Entry(genre).State = EntityState.Modified;
     _db.SaveChanges();
     return(RedirectToAction("Details", genre.GenreId));
 }
コード例 #2
0
 public ActionResult Edit(Actor actor)
 {
     _db.Entry(actor).State = EntityState.Modified;
     _db.SaveChanges();
     return(RedirectToAction("Details", actor.ActorId));
 }
コード例 #3
0
 public ActionResult Edit(Movie movie)
 {
     _db.Entry(movie).State = EntityState.Modified;
     _db.SaveChanges();
     return(RedirectToAction("Details", movie.MovieId)); //might not work
 }