0
votes

I have a table called Matches and a table called Teams in my database where my Matches table has two foreign key HomeTeamID and AwayTeamID link to Teams table.

When I generate edmx file I got Team and Team1 in my Navigation Properties in my Matches class. I overwrote them to HomeTeam and AwayTeam in the design panel, and everything works fine.

But next time when I update my model from database, their names changed back to Team and Team1.

How can I solve this? Thank you in advance =)

1
You may consider moving to Entity Framework. Such things are easier there. - Gert Arnold

1 Answers

0
votes

Add real foreign keys to your DB.