When to use JOIN and when not in LINQ for objects

I'm new to Linq, and I saw that if there are multiple entities, some use multiple FROM syntaxes as follows:

from h in db.Hubs   
from ch in h.CityHubs where ch.Cities.CityID == 1 
select

and some use explication join syntax.

from h in db.Hubs
join ch in da.CityHubs on h.CityId equals ch.CityId
select

If I use Linq for objects, which should I use? If I used Linq for objects, which should I use?

+3
source share
1 answer

, Entity Framework, , join - , EF join SQL . @Craig Stuntz blogpost . Linq-to-objects , .

+2

All Articles