2011-07-02 2 views
2

LINQ 및 Castle Active Records를 사용하여 왼쪽 결합을 어떻게 실행할 수 있습니까?LINQ는 Castle Active Records를 사용하여 왼쪽에 가입 했습니까?

시도하면 다음

from account in AccountRecord.Queryable 
join s in SchoolRecord.Queryable on account equals s.Account into schools 
where account.PaymentType == "S" 
select new { Account = account, School = schools.ElementAt(0) }; 

하지만 나에게 다음과 같은 예외 던졌다 :

'Remotion.Data.Linq.Clauses.GroupJoinClause' 유형 의 개체를 캐스팅 할 수 없습니다를 을 입력하십시오. 'Remotion.Data.Linq.Clauses.FromClauseBase'.

다음과 같은 작업을 실행 (하지만 가입 나는 왼쪽을 필요로하기 때문에 그 나는, 원하지 않는 것을) :

from account in AccountRecord.Queryable 
where account.PaymentType == "S" 
from school in SchoolRecord.Queryable 
where school.Account == account 
select new { Account = account, School = school }; 

답변

2

이 순간에 할 수 없습니다 보인다.

나 또는 다른 누군가가 해결책을 찾으면이 답변을 업데이트 할 것입니다.