public async Task <IdentityResult> Register(RegisterParametersCommand parameters) { var user = new ApplicationUser { UserName = parameters.Email, Email = parameters.Email }; var result = await this.userManager.CreateAsync(user, parameters.Password); return(result); }
public async Task <IActionResult> HandleAsync([FromBody] RegisterParametersCommand parameters) { var result = await this.usersRepository.Register(parameters); if (!result.Succeeded) { return(this.BadRequest(result.Errors.FirstOrDefault()?.Description)); } return(this.Ok(result.Succeeded)); }
public async Task <ApiResponse <bool> > Register(RegisterParametersCommand registerParametersCommandResponse) { var result = await this.httpService.PostJson <RegisterParametersCommand, bool>("api/Authorize/Register", registerParametersCommandResponse); return(result); }