public ActionResult DeleteConfirmed(int id)
        {
            ImageLogement imageLogement = db.ImageLogement.Find(id);

            db.ImageLogement.Remove(imageLogement);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "idImage,NomImage,PathImage,idLog")] ImageLogement imageLogement)
 {
     if (ModelState.IsValid)
     {
         db.Entry(imageLogement).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.idLog = new SelectList(db.Logements, "idLogement", "TitreLogemenet", imageLogement.idLog);
     return(View(imageLogement));
 }
        // GET: ImageLogements/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ImageLogement imageLogement = db.ImageLogement.Find(id);

            if (imageLogement == null)
            {
                return(HttpNotFound());
            }
            return(View(imageLogement));
        }
        // GET: ImageLogements/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ImageLogement imageLogement = db.ImageLogement.Find(id);

            if (imageLogement == null)
            {
                return(HttpNotFound());
            }
            ViewBag.idLog = new SelectList(db.Logements, "idLogement", "TitreLogemenet", imageLogement.idLog);
            return(View(imageLogement));
        }