public ActionResult Edit(Categorie categorie) { if (ModelState.IsValid) { db.Entry(categorie).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(categorie)); }
public ActionResult Edit(Article article) { if (ModelState.IsValid) { db.Entry(article).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.RefCat = new SelectList(db.Categories, "RefCat", "NomCat", article.RefCat); return(View(article)); }