public ActionResult Edit([Bind(Include = "Id,IdVote")] Vote vote) { if (ModelState.IsValid) { db.Entry(vote).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(vote)); }
public ActionResult Edit([Bind(Include = "Id,Lastname,Firstname,Pwd")] User user) { if (ModelState.IsValid) { db.Entry(user).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(user)); }
public async Task <ActionResult> Edit([Bind(Include = "Id,IdResto,Name,Fone,Address")] Restaurant restaurant) { if (ModelState.IsValid) { db.Entry(restaurant).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(restaurant)); }