public ActionResult DeleteConfirmed(string id) { ContenuPromo contenuPromo = db.ContenuPromoes.Find(id); db.ContenuPromoes.Remove(contenuPromo); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Titre,RuntimeMins")] ContenuPromo contenuPromo) { if (ModelState.IsValid) { db.Entry(contenuPromo).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(contenuPromo)); }
public ActionResult Create([Bind(Include = "Titre,RuntimeMins")] ContenuPromo contenuPromo) { if (ModelState.IsValid) { db.ContenuPromoes.Add(contenuPromo); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(contenuPromo)); }
// GET: ContenuPromoes/Delete/5 public ActionResult Delete(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ContenuPromo contenuPromo = db.ContenuPromoes.Find(id); if (contenuPromo == null) { return(HttpNotFound()); } return(View(contenuPromo)); }