public ActionResult Edit([Bind(Include = "id,name,address")] Stores stores) { if (ModelState.IsValid) { db.Entry(stores).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(stores)); }
public ActionResult Edit([Bind(Include = "id,name,description,price,total_in_shelf,total_in_vault,store_id")] Articles articles) { if (ModelState.IsValid) { db.Entry(articles).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.store_id = new SelectList(db.Stores, "id", "name", articles.store_id); return(View(articles)); }