score:2

from c in db.customers
let thecount = c.orders.count()
select new {c.fname, c.lname, thecount}

http://msdn.microsoft.com/en-us/library/bb425822.aspx#linqtosql_topic11

these access operations translate to more complicated joins or correlated sub-queries in the equivalent sql, allowing you to walk through your object graph during a query.

score:6

from c in customers
join o in orders on c.customerid equals o.customerid into g
select new { c.fname, c.lname, count=g.count() }

Related Query

More Query from same tag