这很好,它产生一个左连接
var q =
from c in categories
join p in products
on c equals p.Category into ps
from p in ps.DefaultIfEmpty()
select new { Category = c, ProductName = p == null ? "(No products)" : p.ProductName };
但是如果我想做这样的事情怎么办:
...
on p.date between c.startdate and c.enddate
...