I have been working on an issue tracking application and have decided to do my database access using linq. The only real problem I have run into is how to link two tables that have multiple foreign key relations.
I have table [Issue] and table [User]. [Issue] has fields issue_creator_id and issue_assigned_id, both related to [User].
The problem that I run into is that when I access Issue.User.user_name with linq, I cannot choose between the creator or assigned relationship.
Other than creating a different User table in the dbml for each time I have multiple foreign keys, what can I do?
Brad Engels
Member
19 Points
8 Posts
Multiple foreign keys between two tables
Jan 14, 2008 01:51 PM|LINK
I have been working on an issue tracking application and have decided to do my database access using linq. The only real problem I have run into is how to link two tables that have multiple foreign key relations.
I have table [Issue] and table [User]. [Issue] has fields issue_creator_id and issue_assigned_id, both related to [User].
The problem that I run into is that when I access Issue.User.user_name with linq, I cannot choose between the creator or assigned relationship.
Other than creating a different User table in the dbml for each time I have multiple foreign keys, what can I do?
LINQ Blinq