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));
 }
예제 #2
0
 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));
 }