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