/// <summary> /// 注册用户 /// </summary> private static void RegUser() { AccountProvider _AccountProvider = new AccountProvider(); User _User = new User(); _User.loginName = "test2"; _User.password = GetBase64String("123456"); _AccountProvider.RegUser(_User); }
public HttpResponseMessage RegUser([FromBody] User Param) { try { AccountProvider _Provider = new AccountProvider(); var result = _Provider.RegUser(Param); return(Request.CreateResponse(HttpStatusCode.OK, result)); } catch (Exception ex) { LogFactory _LogFactory = new LogFactory(this.GetType()); _LogFactory.CreateLog(LogType.Error, "用户注册", "RegUser", ex); return(Request.CreateResponse(HttpStatusCode.InternalServerError, ex.Message)); } }