Search code examples
.netentity-frameworklinq-to-entitiesnavigation-properties

Using Joins vs Entity associations


I am learning Entity framework and linq-to-entities.

It's possible to get cross values from multiple tables using JOINS (join keyword) or using the navigation fields ( associations) in which case the framework knows how to reference the cross data.

My question is what to use when?


Solution

  • My $0.02: Always use the navigations when you can. Don't use join in LINQ to Entities or LINQ to SQL unless you're forced to. I explain this in much more detail, with examples, here:

    join in LINQ to SQL and LINQ to Entities Considered Messy, Redundant