假设我有一个左外连接:
from f in Foo
join b in Bar on f.Foo_Id equals b.Foo_Id into g
from result in g.DefaultIfEmpty()
select new { Foo = f, Bar = result }
Run Code Online (Sandbox Code Playgroud)
如何使用扩展方法表达相同的任务?例如
Foo.GroupJoin(Bar, f => f.Foo_Id, b => b.Foo_Id, (f,b) => ???)
.Select(???)
Run Code Online (Sandbox Code Playgroud)