Click here to Skip to main content
15,898,035 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I want to use left outer join for below tables
Entity1 in below
id    A
1     10
2     12
3     -2
4     10
5     5
6     3
7     3
8     5

And Entity2
id
1
2
3
4
5
6
7
8
9
10
11
12

Output
id    A
1     10
2     12
3     -2
4     10
5     5
6     3
7     3
8     5
9     0
10    0
11    0
12    0
Posted

I'm adding few more links in above solution:
MSDN : join clause (C# Reference)[^]
SQL Joins with C# LINQ[^]
C# Join[^]

--Amy
 
Share this answer
 
Comments
Maciej Los 29-Jul-14 2:17am    
+5!
_Amy 29-Jul-14 2:32am    
Thank you Maciej. :)
Shmuel Zang 29-Jul-14 3:19am    
5'ed.
_Amy 29-Jul-14 3:22am    
Thank you Shmuel. :)

See this CP article: LinQ Extended Joins[^].

 
Share this answer
 
Comments
_Amy 29-Jul-14 1:47am    
+5!
Shmuel Zang 29-Jul-14 3:18am    
Thank you Amy.
Maciej Los 29-Jul-14 2:17am    
+5!
Shmuel Zang 29-Jul-14 3:18am    
Thank you Maciej.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900