Click here to Skip to main content
15,892,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi..

What does function of 'into' in following query?
C#
var query = 
from u in dc.UserDetails  join s in dc.SchoolDetails
                on u.SchoolId equals s.SchoolId <big>into </big>JoinedUserSchool
                            from s in JoinedUserSchool.DefaultIfEmpty()
                            select new
                                {
                           UserName = u.FirstName,
                           SchoolName = s != null ? s.Name : null
                                };
Posted
Updated 12-Sep-10 21:21pm
v2

1 solution

See
http://msdn.microsoft.com/en-us/library/bb311045.aspx[^]


Into creates a contextual reference object. Here the UserDetails and SchoolDetails both merges into the object JoinedUserSchool which holds the criteria u.SchoolId equals s.ShoolId

:rose:
 
Share this answer
 
Comments
niravsahayata 13-Sep-10 3:19am    
thanks..

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