0
我想加入3列出了具有以下格式:C#加入3列出了使用LINQ
List1:
CountryID | CountryData | regionUID
===================================
12 | Has good gras | 4567
12 | nice weather | 6789
16 | stormy weather | 1234
List2:
CountryID | CountryName
=======================
12 | green hill
16 | stormy mountain
List3:
regionUID | regionName
=======================
4567 | above 1000feet
6789 | on the ground
1234 | on the hill
輸出應該是這樣的:
CountryName | CountryData | regionName
==============================================
green hill | Has good gras | above 1000feet
green hill | nice weather | on the ground
stormy mountain | stormy weather | on the hill
,其中區域是獨一無二的,國家能適合多線
如果您只是對LINQ Join的語法感興趣,請參閱http://stackoverflow.com/questions/37324/what-is-the-syntax-for-an-inner-join-in -linq-to-sql –
只需在Google中鍵入'將鏈接列表與Linq c#'鍵入,就可以返回無數的好答案,因爲沒有研究工作。 –