SteinTech
SteinTech

Reputation: 4068

One entity belonging to different DataContext

I have an entity that could belong to two different DataContext and it's a element that inherits Identity.
I have on DataContext for Identity and one DataContext for the rest.

Is it a bad idea to include the element in both DataContext?

Upvotes: 0

Views: 144

Answers (1)

markorial
markorial

Reputation: 445

In short Yes. But if you really want to keep it like that than instead using an entity directly from db context you could make two entities for each context than map them into an object that you would use for your purposes.

Upvotes: 1

Related Questions