title: The CreateAsync method neither throws an error nor updates the database
body: <p>I have the following simple code to create a new user using the <code>CreateAsync</code> method. The code does not throw any error but also does not update the database. I have added a breakpoint on the <code>IdentityResult result</code> line, where it stops, and another in the <code>if</code> statement, where it does not stop. As a result, I do not know how to debug this code and find the error. Any help?</p>
  
  <pre class="lang-cs prettyprint-override"><code>public async Task&lt;IdentityResult&gt; Create(ApplicationUser user, string password)
  {
      IdentityResult result = await _userManager.CreateAsync(user, password);
  
      if (!result.Succeeded)
      {
          throw new AppException("Failed");
      }
  
      return result;
  }
  </code></pre>
  
  <p>This <code>Create</code> function is called from the controller:</p>
  
  <pre class="lang-cs prettyprint-override"><code>[AllowAnonymous]
  [HttpPost]
  [Route("api/ApplicationUser/Register")]
  public IActionResult Register([FromBody]ApplicationUserDto userDto)
  {
      //map dto to entity
      var user = _mapper.Map&lt;ApplicationUser&gt;(userDto);
  
      try
      {
          // save 
          _userService.Create(user, userDto.Password);
          return Ok();
      }
      catch (AppException ex)
      {
          // return error message if there was an exception
          return BadRequest(new { message = ex.Message });
      }   
  }
  </code></pre>
  
  <p>The <code>Register</code> method is called from a React interface.</p>