Can I add content tables in the same database as Users? ASP.Net Identity

Asked

Viewed 213 times

0

I created an ASP.Net MVC 5, EF 6 project with individual accounts.

The database is automatically generated with 5 tables:

  • Aspnetroles
  • Aspnetuserclaim
  • Aspnetuserlogins
  • Aspnetuserroles
  • Aspnetusers

Is it good practice to put more tables? For example:

  • Product
  • Category
  • Subcategories
  • Order ...

This being all in the same user database, it will be good practice or it must be kept in a separate database?

1 answer

0


It’s okay to do that.

Contexts are separated in development only by the question of building/destroying the database using the approach Code First. The idea is not to keep creating users every time the base is knocked down.

Enjoying, if you do override of the methods of Identity standard to reference entities of your context, the base will have to be joined in any way, to take advantage of the data of the other tables of your system.

  • 1

    Thank you for the reply!!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.