Subsonic 3 LeftOuterJoin
I have a problem. I want to create sql question
select * from Firma left outer join FirmaAdres on FirmaAdres.Typ = 1 and FirmaAdres.FirmaID = Firma.ID
in subsonic
I have written
SelectColumns("Firma.*").From().LeftOuterJoin(FirmaTable.IDColumn, FirmaAdresTable.FirmaIDColumn).And(FirmaAd开发者_运维知识库resTable.AdresTypIDColumn).IsEqualTo(1)
When I checked what sql question is created I noticed then left outer join is changed to Inner join!!!
Could anyone help me??
Subsonic doesn't support LeftOuterJoin. You need to emulate the left join in LINQ (see http://www.devsource.com/c/a/Languages/Defining-a-Left-Join-with-LINQ-Queries/ for more details) In my opinion the effort don't deserves the pain that is wating for you. I suggest you to use a simple, boring and traditional stored procedure here.
精彩评论