示例#1
0
 public ActionResult Edit(ProductCatalog productcatalog)
 {
     if (ModelState.IsValid)
     {
         db.Entry(productcatalog).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(productcatalog));
 }
 public ActionResult Edit([Bind(Include = "Id,Name")] Product product)
 {
     if (ModelState.IsValid)
     {
         db.Entry(product).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(product));
 }
 public void Update(ProductCategory productCategory)
 {
     _context.Entry(productCategory).State = EntityState.Modified;
 }
示例#4
0
 public void Update(Product product)
 {
     _context.Entry(product).State = EntityState.Modified;
 }
示例#5
0
 public void Update(Brand brand)
 {
     _context.Entry(brand).State = EntityState.Modified;
 }