Best way to do multiple table associations in LINQ dbml file?

I have a couple of tables in my database, one is called Task and the other is User . The Task table has two columns, CreatedBy and ModifiedBy , which appear in the UserId column in the User table.

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

Should I just make changes to the properties or is it better to bring the table into the dbml file twice and rename it to what I would look at.

Just wondering what is the best way to do this.

+1


source to share


1 answer


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



+1


source







All Articles