ef core - how to make multiple variations of a class map to the same table
ef core - how to make multiple variations of a class map to the same table
I have 5 satellite assemblies with their own db contexts. I created a 6th the assembly just for code first migration. The idea was to add the satellite assemblies as references then create migration for all models. The quirk with this setup is that some of the satellite assemblies have same classes but with more or less properties(depending on whether they make sense in their respective context).
When I create a migration I get: Cannot use table 'dbo.TableA' for entity type 'PartialClassA' since it is being used for entity type 'ClassA' and there is no relationship between their primary keys.
Cannot use table 'dbo.TableA' for entity type 'PartialClassA' since it is being used for entity type 'ClassA' and there is no relationship between their primary keys.
I hope what I am trying to do make sense, my question is how do we make this work with code first?
1 Answer
1
For anyone interested, here is a response from the ef core github forum
Required, but never shown
Required, but never shown
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.