예제 #1
0
        public ActionResult Create([Bind(Include = "ID,Username,Balance")] User user)
        {
            if (ModelState.IsValid)
            {
                db.Users.Add(user);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(user));
        }
예제 #2
0
 public void Save()
 {
     context.SaveChanges();
 }