Home

Creating a connection to two typed EF6 DbContexts

edited December 2021

I know that this is probably an edge case but I still want to ask if there is any possibility to have a connection to two typed EF6 DbContexts. The problem I am facing is the following:
I have created a typed DbContext to my application DLL. All went fine, but inside that DLL there are two DbContext (one used to handle the Identity tables and one used to handle my own tables). The resulting connection tree shows only the tables related to the Identity infrastructure and it seems there is no way to show the tables handled by the second DbContext. Probably the problem arises from the fact that there is just one connectionstring in the web.config used by both contexts. Any hint?

UPDATE It seems that albeit the connection tree shows only the tables(entity) from one single context, in code I can create both contexts and use the entities for each context. Weird

Comments

Sign In or Register to comment.