Using Joins vs Entity Associations

I am learning the Entity framework and linq-to-entity.

You can get cross-values ​​from multiple tables using JOINS (the join keyword) or using the navigation (association) fields, in which case the structure knows how to reference the cross-data.

My question is what to use when?

+3
source share
1 answer

My $ 0.02: always use navigation whenever you can. Do not use joinin LINQ to Entities or LINQ to SQL unless you are forced to. I explain this in more detail, with examples:

join LINQ to SQL LINQ , ,

+4

Source: https://habr.com/ru/post/1744250/


All Articles