public async Task<IHttpActionResult> Register(User userModel) { if (!ModelState.IsValid) { return BadRequest(ModelState); } IdentityResult result = await _userManager.CreateAsync(userModel); IHttpActionResult errorResult = GetErrorResult(result); if (errorResult != null) { return errorResult; } return Ok(); }
public async Task<IdentityResult> RegisterUser(User userModel) { var result = await _userManager.CreateAsync(userModel); return result; }