SubSonic 3 中的 Outer Join 语句似乎有一个错误,或者这只是我的无知,但以下废话:
var Objeto = from t in Table1.All()
join su in table2.All() on t.Id equals su.Id
join tab2 in Table1.All() on t.PId equals tab2.Id into gj
from j in gj.DefaultIfEmpty()
select new
{
t.Field1,
SN = su.Field123,
PTN = (j == null ? null : j.FieldABC)
};
和:
The expression of type 'System.Linq.IQueryable` xxxx is not a sequence