public ActionResult DeleteConfirmed(int id) { eshoper_category eshoper_category = db.eshoper_category.Find(id); db.eshoper_category.Remove(eshoper_category); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "categoryID,categoryImgID,categoryName")] eshoper_category eshoper_category) { if (ModelState.IsValid) { db.Entry(eshoper_category).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(eshoper_category)); }
public ActionResult Create([Bind(Include = "categoryID,categoryImgID,categoryName")] eshoper_category eshoper_category) { if (ModelState.IsValid) { db.eshoper_category.Add(eshoper_category); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(eshoper_category)); }
// GET: eshoper_category/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } eshoper_category eshoper_category = db.eshoper_category.Find(id); if (eshoper_category == null) { return(HttpNotFound()); } return(View(eshoper_category)); }