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