When i declare
int[] a = { 1, 2 ,10,30};
int[] b = { 10, 20, 30 };
var q = from item1 in a
join item2 in b
on item1 equals item2
into g
select g
1)What is actually getting selected into g ? It is difficult to understand the into
keyword. if you give example to explain the keyword "into"
,i will be pleased.
2)
How do the following code actually projected ?
1 from a in db.coll1
2 join b in db.coll2 on a.PK equals b.PK into b_join
3 from b in b_join.DefaultIfEmpty()
4 where
5 b.PK == null
6 select new {
7 a.PK,
8 a.Value,
9 Column1 = (System.Int32?)b.PK,
10 Column2 = b.Value
}
in line 2 we are using "b' to select the item in line 3 also we are using the same b ,does it mean we are overriding the data we selected at line 2 ?