public ActionResult Edit([Bind(Include = "ID,fname,lname,gender,age")] Membership membership) { if (ModelState.IsValid) { db.Entry(membership).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(membership)); }
public ActionResult Edit([Bind(Include = "MemberID,UserName,DisplayName,DateJoined,LastLogin,ProfileID")] Member member) { if (ModelState.IsValid) { db.Entry(member).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.MemberID = new SelectList(db.Profiles, "ProfileID", "ProfileID", member.MemberID); return(View(member)); }