3
votes

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?

1
Use navigation properties when you CAN use navigation properties:) They are here to make your life easier. - LukLed

1 Answers

4
votes

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