I use EntityFramework 6 with code first and i am trying to solve a problem with two contexts and overlapping entities.
Example:
Context c1 has the entities A and B
Context c2 has the entities B and C
Entity B is in c1 and c2 the same entity
Entity B has a many to many relation to entity A
Entity B has also a many to many relation to entity C
c1 c2
(A -- B)(B -- C)
I tried to solve this problem with inheriting entity B in the second context with a child class and add the relation to entity C there.
In my current approach EF tells me that the database already has the entity B (from update-database of c1) and it will stop updating context c2.
Someone got a solution or a complete different approach?