Linq Multiple Join Query


I have a object which contains a list. I currently query this list using the code below.

var tfIDs = from orderItem in _orderBlock.Orders
                        join assetItem in tfEntity.AssetDetails on orderItem.SecurityID equals assetItem.sSedol
                        select new { orderItem, assetItem };

Open in new window

The only issue is that I also need to join on assetItem.sIsin.

For example I have a list of ID's some might be sedol others ISINs. So I need all the orderItems to be returned regardless if a match is found for them in the tfEntity.AssetDetails table. Is this possible?

Any help would be great.
Who is Participating?
Fernando SotoConnect With a Mentor RetiredCommented:
Hi M;

Quite not understanding your question. Are you saying that on the join in your current query you wish only to join if (orderItem.SecurityID and orderItem.ISIN) equal (assetItem.sSedol and assetItem.ISIN) ?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.