I’m creating a C# T4 template to scaffold some classes based on .edmx file, so far so good. What I now need though, is a way to access the name of the columns it connects in the database, through a NavigationProperty.
I realized, not long ago, that you can access this information in the .edmx visual designer, under mapping details for an specific NavigationProperty:

So basically, if in the T4 template; I already have an instance of the NavigationProperty I want… How can I get the names of the fields it connects? (WeatherOnMondays in this case)
Answers from: EF4: Get the linked column names from NavigationProperty of an EDMX
2 ways of achieving this:
2nd approach: