コード例 #1
0
        public ActionResult Create(Member member)
        {
            if (ModelState.IsValid)
            {

                db.Members.Add(member);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(member);
        }
コード例 #2
0
 public ActionResult Edit(Member member)
 {
     if (ModelState.IsValid)
     {
         member.bDelete = false;
         db.Entry(member).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(member);
 }