public ActionResult Edit([Bind(Include = "Id,Name")] Voiture voiture)
 {
     if (ModelState.IsValid)
     {
         db.Entry(voiture).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(voiture));
 }
 public ActionResult Edit([Bind(Include = "Id,Firstname,Lastname")] Conducteur conducteur)
 {
     if (ModelState.IsValid)
     {
         db.Entry(conducteur).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(conducteur));
 }
Exemple #3
0
        public async Task <ActionResult> Edit([Bind(Include = "Id,Name,Points")] Permi permi)
        {
            if (ModelState.IsValid)
            {
                db.Entry(permi).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(permi));
        }