示例#1
0
 public ActionResult Signup(UserDetail userDetail)
 {
     if (ModelState.IsValid == true)
     {
         db.UserDetails.Add(userDetail);
         int a = db.SaveChanges();
         if (a > 0)
         {
             ViewBag.InsertMessage = "<script>alert('Registration successful !!')</script>";
             ModelState.Clear();
         }
         else
         {
             ViewBag.InsertMessage = "<script>alert('Registration Failed !!')</script>";
         }
     }
     return(View());
 }
 public void SaveChanges()
 {
     _dbContext.SaveChanges();
 }