1

I have two DbContext, one for Asp.net Identity and other one is for the rest of my domain. Now according to this design I have many problems to manage Initializing database. As you may know I would like to seed those tables belong to each DbContext which has its own issues. I want to know is this good idea to merge those DbContext instead of having one for each one?

Any advice will be helpful.

Saber Amani
  • 6,409
  • 12
  • 53
  • 88

1 Answers1

1

I would do just a single DBContext for both Identity entities and other. This way you can easily build relationships between you user/roles entities and the rest of your domain.

Are you using Identity 2.0? Take a look at this question: ASP.NET Identity DbContext confusion

Community
  • 1
  • 1
Rev
  • 57
  • 4