I am trying to create a LINQ statement that executes an outerjoin. I am not getting anywhere as the examples I have managed to see so far are all in C#.
I have TWO columns one called posting_id and the other link_posting_id.
There will ALWAYS be a posting_ID but in some instances there will also be a posting_id.
where there is a link_posting_id it will equal an earlier posting_id.
I wanted to create an LINQ statement that displays all the posting_Id's but at the same time group those lines with a link_posting_id with the identical Posting_id.
I had the idea that if you use an outer join you would obtain all the posting_ids and all the link_posting_ids directly UNDER each of the identical posting_ids...
I tried this as a first attempt:
Dim test3= From ledg1 In db.ledgers _
Join ledg2 In db.ledgers On ledg1.posting_id Equals ledg2.link_posting_id into g _
From ledg3 In g.defaultIfEmpty() _
But my sytax is wrong...
I have included a jpg of the table which should make it clearer.
If someone could point me in the right direction on this it would be helpful.