Multiple databases in one project - Entity infrastructure (self-tracking objects)

In my project, I want to have access to two different databases. I created two .edmx files in the same project, added T4 thingie and kaboom self-test objects :) It no longer works.

I get looooooot ambiguity errors (ObjectChangeTracker etc.)

What would be the preferred solution here? I can remove duplicate content in the generated files, but when I change the .edmx file, it just restores, of course ... Any thoughts?

+3
source share
1 answer

, T4, edmx.

WriteHeader(fileManager);
BeginNamespace(namespaceName, code);
/* Comment out this part
WriteObjectChangeTracker();
WriteIObjectWithChangeTracker();
WriteCustomObservableCollection();
WriteINotifyComplexPropertyChanging();
WriteEqualityComparer();
*/
EndNamespace(namespaceName);

, edmx .

+1

Source: https://habr.com/ru/post/1746427/


All Articles