I want to make an MVC website with user logins/authentication etc.
I'm using EF CodeFirst to create my database.
If I create a new MVC project and select Authentication: Individual User Accounts, it will create a new project with an already existing IdentityDbContext etc.
Am I meant to continue using this along with my own DbContext? One context for my projects entities, and the other context for the Identity entities? Does this mean I'll have two separate databases, or can I give them both the same connection string?
I know this may be an open ended question, but are there any good resources/tutorials for AspNet Identity?
So far I've only been finding resources about AspNet Identity itself, and not how to integrate it with the rest of the project/database
You can specify the same connection string for both of your custom models context and identity context, all you have to do is to change the connection string in the constructor of the ApplicationDbContext class that resides in
IdentityModels.cs
file like so:and the tables needed for identity will be created in the same database as your other entities, as for resource there is a good set of articles on identity here.