I've read all the below questions (and more)
- How to add new table to existing database code first
- How to create ASP.net identity tables in an already created database using code first?
- Entity Framework - How to check if table exists?
I want to know how IdentityDbContext
adds its tables (AspNetUsers, AspNetUserLogins, etc.) to an existing database on the first application run.
I don't think they use any of these mechanisms to check if a table exists then apply a migration if not.
Is there any reference to the source code they use ?
Note:
I ask because I have multiple DbContext
s in my application, and I want to (find a database-independent solution to) add only the db tables that the user will need at runtime.