public async Task <ActionResult> Edit([Bind(Include = "MemberImageId,FileName,Title")] MemberImage memberImage)
        {
            if (ModelState.IsValid)
            {
                db.Entry(memberImage).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index", "Members"));
            }
            ViewBag.MemberImageId = new SelectList(db.Members, "MemberId", "Name", memberImage.MemberImageId);
            return(View(memberImage));
        }
Beispiel #2
0
 public JsonResult Edit(Member member)
 {
     db.Entry(member).State = EntityState.Modified;
     db.SaveChanges();
     return(Json(null));
 }