Exemplo n.º 1
0
 public ActionResult Edit([Bind(Include = "id,product_name,product_price,product_description,product_image,product_category")] Product product)
 {
     if (ModelState.IsValid)
     {
         db.Entry(product).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(product));
 }
Exemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "cus_id,cus_fn,cus_lf,cus_mail,cus_phone")] Customer customer)
 {
     if (ModelState.IsValid)
     {
         db.Entry(customer).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(customer));
 }