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