示例#1
0
 public ActionResult Edit([Bind(Include = "ID,Firstname,MiddleName,Lastname,EmailAddress,Phone,Address1,Address2,City,State,ZipCode")] Customer customer)
 {
     if (ModelState.IsValid)
     {
         db.Entry(customer).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(customer));
 }
示例#2
0
 public ActionResult Edit([Bind(Include = "ID,ProdName,ProdDescription,Price,ProdAttributes")] Product product)
 {
     if (ModelState.IsValid)
     {
         db.Entry(product).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(product));
 }