linq to sql 实现左外部连接:var query=from a in A join b in B on a.ID equals b.aID into ab from a1 in ab.DefaultIfEmpty() select a1;
然后取query.Count()就行了
因为是延迟查询所以不会多查数据
时间: 2024-10-17 03:13:59
linq to sql 实现左外部连接:var query=from a in A join b in B on a.ID equals b.aID into ab from a1 in ab.DefaultIfEmpty() select a1;
然后取query.Count()就行了
因为是延迟查询所以不会多查数据