title: ASP.NET/Identity Error: The entity type ApplicationUser is not part of the model for the current context
body: <p>In <a href="https://stackoverflow.com/questions/19612734/move-asp-net-identity-store-to-ef-sql-database">Move ASP.NET Identity store to EF Sql database</a> zoidbergi described an issue similar to that which I'm experiencing, but which was not completely answered. I am receiving the error above when attempting to migrate from the inbuilt .mdf database to MySQL.  I am using a Database-First methodology and have successfully created the Entity Model from the underlying Mysql database.</p>
  
  <p>No matter whether I recreate the asp.net identity datatables the application chokes as soon as user manager is accessed:</p>
  
  <pre><code>The entity type ApplicationUser is not part of the model for the current context.
  
  Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 
  
  Exception Details: System.InvalidOperationException: The entity type ApplicationUser is not part of the model for the current context.
  
  Source Error:  
  
  Line 65:             ' Create a local login before signing in the user
  Line 66:             Dim user = New ApplicationUser() With {.UserName = model.UserName}
  **Line 67:             Dim result = Await UserManager.CreateAsync(User, model.Password)**
  Line 68:             If result.Succeeded Then
  Line 69:                 Await SignInAsync(User, isPersistent:=False)
  </code></pre>
  
  <p>I have pointed the ApplicationDBContext at my DbContext model:</p>
  
  <pre><code>Public Class ApplicationDbContext
      Inherits IdentityDbContext(Of ApplicationUser)
      Public Sub New()
          MyBase.New("IMSEntities")
      End Sub
  End Class
  </code></pre>
  
  <p>Googling tends to find people who have given up and coded up their own security providers - I'd like to use the standard one if possible.  Baffled!</p>