Reputation: 5536
I am using EF to access a SQL DB. For the sake of this example Lets assume I have a Users Table, a User Comments Table (comments made by users) and a Liked comments table (comments a user marked like on them) when the Context is generated I get in the User.cs file the following ICollections:
public virtual ICollection<Comment> Comments { get; set; }
public virtual ICollection<Comment> Comments1 { get; set; }
How can I know which is which? Why does EF not add the foreign key table name to the column?
I have several of these issues.
Upvotes: 2
Views: 245
Reputation: 26386
in the edmx designer, click on the navigation property ("Comments" or "Comments1") and press F4 to show it's properties. The properties panel will display the foreign key name which will give you enough info to identify which is which.
Upvotes: 2