简体   繁体   中英

Using ASP.net Identity user with other tables

I am just trying the new ASP.Net Identity, but run into some issues.

The first issue is that I found out that the ApplicationContext inherits IdentityDbContext rather than DbContext which I think has reasons.

The second issue is that since I will be using a lot of tables apart from the standard table generated by the Identity, should all my DbSet be declared within the ApplicationContext that inherits IdentityDbContext?

I'm not sure what your first issue is asking. But for your second, no, you aren't required to use the context for managing other tables in your database. I use the ADO.NET Entity Data Model for my application's tables typically, and only need to use the Identity Context for any Account/Role related controllers.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM