public ActionResult Edit([Bind(Include = "IdPublicite,Image,Titre,Description")] Publicite offre) { if (ModelState.IsValid) { db.Entry(offre).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("ListePublicitee")); } return(View(offre)); }
public ActionResult Edit([Bind(Include = "IdOffer,Description,DateDebut,DateFin")] Offre offre) { if (ModelState.IsValid) { db.Entry(offre).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(offre)); }
public ActionResult Edit([Bind(Include = "UserId,login,password")] User user) { if (ModelState.IsValid) { db.Entry(user).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(user)); }
public ActionResult Edit([Bind(Include = "IdNewslettre,IdUser,MailUser,PhoneUser,status")] Newslettre newslettre) { if (ModelState.IsValid) { db.Entry(newslettre).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.IdUser = new SelectList(db.Users, "IdUser", "Nom", newslettre.IdUser); return(View(newslettre)); }
public virtual void Update(T entity) { dbset.Attach(entity); dataContext.Entry(entity).State = EntityState.Modified; }