我正在编写如下Linq
查询:但是在运行时抛出以下错误:
The method 'Join' cannot follow the method 'SelectMany' or is not supported. Try writing the query in terms of supported methods or call the 'AsEnumerable' or 'ToList' method before calling unsupported methods.
LINQ
from a in AccountSet
join sm in new_schoolMemberSet on a.AccountId equals sm.new_OrganisationId.Id
into ps from suboc in ps.DefaultIfEmpty()
join sr in new_schoolRoleSet on suboc.new_SchoolRoleId.Id equals sr.new_schoolRoleId
where sr.new_name == "Manager"
where a.new_OrganisationType.Value == 430870007
select new { a.AccountId, suboc.new_schoolMemberName }
我期待结果如下:
我以前从未在 Linq 中使用过外部联接。因此,如果我做错了,请纠正我。
谢谢