Exemplo n.º 1
0
 public ActionResult Edit([Bind(Include = "ProductId,Title,ProductCatagory,Price,Colour,mainImage,Description")] Product product)
 {
     if (ModelState.IsValid)
     {
         db.Entry(product).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(product));
 }
 public ActionResult Edit([Bind(Include = "UserId,FirstName,LastName,Email,Phone,DOB,Role,Gender,Password,ConformPassword")] User user)
 {
     if (ModelState.IsValid)
     {
         db.Entry(user).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(user));
 }