public ActionResult Edit([Bind(Include = "Id,Name,Email,Content")] Guestbook guestbook) { if (ModelState.IsValid) { db.Entry(guestbook).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(guestbook)); }
public ActionResult Edit([Bind(Include = "ID,Name")] Face face) { if (ModelState.IsValid) { db.Entry(face).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(face)); }
public ActionResult Edit([Bind(Include = "ID,Name,Description,Owner")] Book book) { if (ModelState.IsValid) { db.Entry(book).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(book)); }
public ActionResult Edit([Bind(Include = "ID,Name,Comment,FaceID,BookID")] Guest guest) { if (ModelState.IsValid) { db.Entry(guest).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.BookID = new SelectList(db.Books, "ID", "Name", guest.BookID); ViewBag.FaceID = new SelectList(db.Faces, "ID", "Name", guest.FaceID); return(View(guest)); }