Sql – Best way to do multiple table associations in a LINQ dbml file

databaselinq-to-sql

I have a couple of tables in my database, one called Task, and another called User. The Task table has two columns CreatedBy and ModifiedBy that map to the UserId column in the User table.

I want to add the User table to the dbml file and add the associations. I notice now that when I look at class I have two properties one called User and the other called User1. I would rather have it say CreatedByUser and ModifiedByUser.

Should I just go in an modify the properties or is it better to bring the table into the dbml file twice and rename it to what I would look.

Just wondering what the best way to do this would be.

Best Answer

Rename the properties. These really are just properties and it's ok to link them back to the same table.