public ActionResult Edit([Bind(Include = "id,NomComplet,Login,Password")] Utilisateur utilisateur) { if (ModelState.IsValid) { db.Entry(utilisateur).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(utilisateur)); }
public ActionResult Edit([Bind(Include = "id,Nom,Prenom,Email,CIN,sexe,DateNaissance,LieuNaissance,Nationalite,SecondeNationalite,Matricule,NbrEnfants")] Agent agent) { if (ModelState.IsValid) { db.Entry(agent).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(agent)); }