示例#1
0
        public IActionResult CreateUser([Bind("username", "password", "confirm")] User user)
        {
            if (!ModelState.IsValid)
            {
                return(View("Create"));
            }

            System.Diagnostics.Debug.WriteLine(user.username);
            SQLFunction functions = HttpContext.RequestServices.GetService(typeof(SQLFunction)) as SQLFunction;

            functions.InsertUser(user.username, user.password);
            return(RedirectToAction("Index", "Home"));
        }