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)); }
public void Save() { context.SaveChanges(); }
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)); }
public void Save() { context.SaveChanges(); }