title: System.Data.SqlClient.SqlException (0x80131904): Invalid column name 'UserId'.\r\nInvalid column name 'UserId'
body: <p>I have migrated the ASP.NET Membership provider to ASP.NET Identity, Post Migration when I am trying to create user (with duplicate username) using Web Api Controller I get the following error. This error is not catch on IdentityResult.</p>
  
  <blockquote>
    <p>"message": "System.Data.SqlClient.SqlException (0x80131904): Invalid
    column name 'UserId'.\r\nInvalid column name 'UserId'.\r\n   at
    System.Data.SqlClient.SqlCommand.b__24(Task1
    result)\r\n   at
    System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()\r\n
    at System.Threading.Tasks.Task.Execute()\r\n--- End of stack trace
    from previous location where exception was thrown ---\r\n   at
    System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task
    task)\r\n   at
    System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
    task)\r\n   at
    System.Runtime.CompilerServices.TaskAwaiter 1.GetResult()\r\n   at
    System.Data.Entity.Utilities.TaskExtensions.CultureAwaiter1.GetResult()\r\n
    at
    System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition.d__c.MoveNext()\r\nClientConnectionId:95d07c45-7f78-448c-9392-09999eb8c42d"</p>
  </blockquote>
  
  <p>My Code.</p>
  
  <pre><code>var user1 = new ApplicationUser
                      {
                          Id = Guid.NewGuid().ToString(),
                          UserName = ud.Username,
                          Email = ud.Email,
                          IsApproved = false,
                          ApplicationId = new Guid("4600317a-8e7e-476a-86f1-8409a5ed60b7"),
                          LoweredUserName = ud.Username.ToLower(),
                          LastActivityDate = Convert.ToDateTime("1754-01-01 00:00:00.0000000"),
                          CreateDate = DateTime.Now,
                          IsLockedOut = false,
                          LoweredEmail = ud.Email.ToLower(),
                          LastLoginDate = Convert.ToDateTime("1754-01-01 00:00:00.0000000")
                      };
  var result = await userManager.CreateAsync(user1, ud.Password);
  </code></pre>