title: Web API 2 cannot register user
body: <p>I have a Web API 2 project using MVC. It uses entity framework. This entity framework uses a database first approach with a .edmx file.</p>
  
  <p>The project is based on VS 2013 Express Web API 2 template. I just used my own database. I didn't modify any account related code. But when I try to register a new user, the following statement in AccountController.cs throw exception:</p>
  
  <pre><code>public async Task&lt;IHttpActionResult&gt; Register(RegisterBindingModel model)
  {
      ...
      IdentityResult result = await UserManager.CreateAsync(user, model.Password);
      ...
  }
  </code></pre>
  
  <p>The exception says:</p>
  
  <pre><code>Cannot insert the value NULL into column 'Discriminator', table 'xxx.dbo.AspNetUsers'; column does not allow nulls. INSERT fails.
  The statement has been terminated.
  </code></pre>
  
  <p>Can anyone help me? Thank you!    </p>