コード例 #1
0
        public ActionResult Create(aspnet_Membership aspnet_membership)
        {
            if (ModelState.IsValid)
            {
                aspnet_membership.UserId = Guid.NewGuid();
                db.aspnet_Membership.Add(aspnet_membership);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

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