Exemple #1
0
 public ActionResult Edit([Bind(Include = "ID,DeliveredOn,OrderOn,Value")] Order order)
 {
     if (ModelState.IsValid)
     {
         db.Entry(order).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(order));
 }
Exemple #2
0
 public ActionResult Edit([Bind(Include = "ID,UserName,Balance")] User user)
 {
     if (ModelState.IsValid)
     {
         db.Entry(user).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(user));
 }
Exemple #3
0
 public ActionResult Edit([Bind(Include = "ID,Name,Cost,Class,ImageURL")] ShopItem shopItem)
 {
     if (ModelState.IsValid)
     {
         db.Entry(shopItem).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(shopItem));
 }