So I have a project with my custom, local DB (created by model-first approach). I need to create there identification tables (like asp_users, asp_roles, I don't remember how exactly they are called, but I hope you got the idea). As far as I know, they should be created on first registration, however it doesn't happen:
I can't see those tables in SQL Management Studio either. My connection string (created automatically with DB):
<!--<add name="DefaultConnection" connectionString="Data Source=(LocalDb)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\aspnet-WebApplication1-20170504122316.mdf;Initial Catalog=aspnet-WebApplication1-20170504122316;Integrated Security=True" providerName="System.Data.SqlClient" />-->
<add name="DefaultConnection" connectionString="metadata=res://*/DBModel.csdl|res://*/DBModel.ssdl|res://*/DBModel.msl;provider=System.Data.SqlClient;provider connection string="data source=VADIM-PC;initial catalog=PIT_3_Project_DB;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
The first connection string is truly default, the second is mine.
The fun part is - authentication works fine, I can register and login, and I don't see where my code cane use with the default local DB.
UPD: Sorry, I haven't changed this row:
public ApplicationDbContext()
: base("DBModelContainer", throwIfV1Schema: false)
{
}
I have changed DBModelContainer to DefaultConnection and now I am getting this error (when I am trying to register)
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.
