Exemple #1
0
 public ActionResult Edit([Bind(Include = "Id,ProductName,Price,ProductCode,AddedDate")] TopProduct topproduct)
 {
     if (ModelState.IsValid)
     {
         db.Entry(topproduct).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(topproduct));
 }
 public ActionResult Edit([Bind(Include = "CatId,CategoryName,ProductName,Price,ProductCode,AddedDate")] Category category)
 {
     if (ModelState.IsValid)
     {
         db.Entry(category).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(category));
 }