예제 #1
0
 public ActionResult Delete(int id)
 {
     ecm.Models.item item = db.items.Find(id);
     db.items.Remove(item);
     db.SaveChanges();
     return(RedirectToAction("items"));
 }
예제 #2
0
 public ActionResult Edit(int id)
 {
     ecm.Models.item item = db.items.Find(id);
     if (item == null)
     {
         return(HttpNotFound());
     }
     return(View(item));
 }
예제 #3
0
 public ActionResult ProductDetails(int id)
 {
     ViewBag.title = "Product Details";
     ecm.Models.item item = db.items.Find(id);
     if (item == null)
     {
         return(HttpNotFound());
     }
     return(View(item));
 }