コード例 #1
0
 public Task <IActionResult> SignUp(SysUser user)
 {
     return(Task.Factory.StartNew <IActionResult>(() =>
     {
         var success = false;
         var msg = "数据验证失败";
         if (ModelState.IsValid)
         {
             success = _userRepository.SignUp(user.Telephone, user.SysUserName, user.SysPassword, user.EMail);
             msg = success?"注册成功":"注册失败";
         }
         return Json(new { success, msg });
     }));
 }