public ActionResult Edit([Bind(Include = "PostId,Post,UserId,PostTime")] Posts posts) { if (ModelState.IsValid) { db.Entry(posts).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(posts)); }
public ActionResult Edit([Bind(Include = "UserId,UserName")] Users users) { if (ModelState.IsValid) { db.Entry(users).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(users)); }