Exemplo n.º 1
0
 public ActionResult Edit([Bind(Include = "BookID,Title,Author,Genre,Description,DateAdded,DateModified")] Book book)
 {
     if (ModelState.IsValid)
     {
         db.Entry(book).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(book));
 }
Exemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "UserID,FirstName,LastName,Role,Username,Password")] User user)
 {
     if (ModelState.IsValid)
     {
         db.Entry(user).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(user));
 }