public ActionResult Edit([Bind(Include = "UserId,Email,Password,FirstName,LastName")] User user) { if (ModelState.IsValid) { db.Entry(user).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(user)); }
public ActionResult Edit([Bind(Include = "ItemId,Name,Description,Price")] Item item) { if (ModelState.IsValid) { db.Entry(item).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(item)); }
public ActionResult Edit([Bind(Include = "OrderId,UserId,DateCreated")] Order order) { if (ModelState.IsValid) { db.Entry(order).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.UserId = new SelectList(db.Users, "UserId", "Email", order.UserId); return(View(order)); }