Question

Where in .edmx-file I can find the assembly name? Second, when I create my own partial class, how do I make it to appear in the same assembly?

Was it helpful?

Solution

There is no assembly name in the edmx file. The code generated from the edmx file becomes part of the project the edmx file is part of and therefore become part of assembly that is compiled for this project. Partial classes are mostly a compiler trick and when you compile partial classes the compiler will combine all the partial classes into one and in the assembly you will always have just one class.

OTHER TIPS

Keep in mind that in order for partial classes to work, all the partial classes must reside in the same Assembly and the same Namespace. In your case, suppose you have a class in your Entity Data model called Foo. Now, this Foo class will be a partial class residing in your .edmx file. Also, suppose that you want to extend this partial class with an additional property called Bar. What you will need to do is create another partial class named Foo in the same assembly, or basically the same project as the one containing your .edmx file, and add the new property Bar to that partial class implementation of Foo. Also, the new partial Foo class containing the Bar property will need to reside in the same Namespace as the Foo partial class residing in the .edmx file.

I hope this helps.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top