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