This is not a duplicate of this post , although the name is very similar. I am using EF4 with MSSQL Express 2008 R2 on VS2010.
A simplified version of my schema is as follows:
Table [Team]:
Id (PK)
Member1
Member2
Table [Person]:
Id (PK)
FirstName
[Team] .Member1 and [Team] .Member2 are foreign keys pointing to [Person] .Id.
When generating .edmx through VS2010, the navigation properties in [Team] become "Person" and "Person1", despite the fact that they give different FK names inside SQLServer.
Is it possible to make the .edmx generator recognize my FK names in SQL Server? I would like these names to be Member1Person and Member2Person, for example, so I don’t need to manually rename them manually. If not, how can you redesign your / FK tables to get around this at all? Thank.
Alex source
share