<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Multiple List Left Join in LINQ</title>
	<atom:link href="http://codingsense.wordpress.com/2009/06/16/multiple-list-left-join-in-linq/feed/" rel="self" type="application/rss+xml" />
	<link>http://codingsense.wordpress.com/2009/06/16/multiple-list-left-join-in-linq/</link>
	<description>Bridge to future</description>
	<lastBuildDate>Tue, 15 Dec 2009 04:30:20 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: blake</title>
		<link>http://codingsense.wordpress.com/2009/06/16/multiple-list-left-join-in-linq/#comment-179</link>
		<dc:creator>blake</dc:creator>
		<pubDate>Tue, 24 Nov 2009 20:15:51 +0000</pubDate>
		<guid isPermaLink="false">http://codingsense.wordpress.com/2009/06/16/multiple-list-left-join-in-linq/#comment-179</guid>
		<description>just what I need, thanks bro</description>
		<content:encoded><![CDATA[<p>just what I need, thanks bro</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bramoin</title>
		<link>http://codingsense.wordpress.com/2009/06/16/multiple-list-left-join-in-linq/#comment-150</link>
		<dc:creator>bramoin</dc:creator>
		<pubDate>Thu, 03 Sep 2009 16:26:23 +0000</pubDate>
		<guid isPermaLink="false">http://codingsense.wordpress.com/2009/06/16/multiple-list-left-join-in-linq/#comment-150</guid>
		<description>thank you!</description>
		<content:encoded><![CDATA[<p>thank you!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: codingsense</title>
		<link>http://codingsense.wordpress.com/2009/06/16/multiple-list-left-join-in-linq/#comment-149</link>
		<dc:creator>codingsense</dc:creator>
		<pubDate>Wed, 02 Sep 2009 05:19:52 +0000</pubDate>
		<guid isPermaLink="false">http://codingsense.wordpress.com/2009/06/16/multiple-list-left-join-in-linq/#comment-149</guid>
		<description>Hi bramoin

Use the below query to get all the fields of emp.

var MultipleListJoin = from empdept in
                                   (from emp in ListOfEmployees
                                    join dept in ListOfDepartment
                                    on emp.DeptID equals dept.ID into JoinedEmpDept
                                    from dept in JoinedEmpDept.DefaultIfEmpty()
                                    select new
                                    {
                                        emp,
                                        BranchID = dept != null ? dept.BranchID : 0,
                                        DepartmentName = dept != null ? dept.Name : null
                                    })
                               join branch in ListOfBranch on
                               empdept.BranchID equals branch.ID into JoinedwithBranch
                               from branch in JoinedwithBranch.DefaultIfEmpty()
                               select new
                               {
                                   empdept,
                                   DeptName = empdept.DepartmentName,
                                   BranchName = branch != null ? branch.Name : string.Empty
                               };

Just replacing emp.name with emp will do. later if you need to access any fields of emp then use MultiList.empdept.emp.Name etc. For more clarification please get back.

Thanks,
Naveen Prabhu</description>
		<content:encoded><![CDATA[<p>Hi bramoin</p>
<p>Use the below query to get all the fields of emp.</p>
<p>var MultipleListJoin = from empdept in<br />
                                   (from emp in ListOfEmployees<br />
                                    join dept in ListOfDepartment<br />
                                    on emp.DeptID equals dept.ID into JoinedEmpDept<br />
                                    from dept in JoinedEmpDept.DefaultIfEmpty()<br />
                                    select new<br />
                                    {<br />
                                        emp,<br />
                                        BranchID = dept != null ? dept.BranchID : 0,<br />
                                        DepartmentName = dept != null ? dept.Name : null<br />
                                    })<br />
                               join branch in ListOfBranch on<br />
                               empdept.BranchID equals branch.ID into JoinedwithBranch<br />
                               from branch in JoinedwithBranch.DefaultIfEmpty()<br />
                               select new<br />
                               {<br />
                                   empdept,<br />
                                   DeptName = empdept.DepartmentName,<br />
                                   BranchName = branch != null ? branch.Name : string.Empty<br />
                               };</p>
<p>Just replacing emp.name with emp will do. later if you need to access any fields of emp then use MultiList.empdept.emp.Name etc. For more clarification please get back.</p>
<p>Thanks,<br />
Naveen Prabhu</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bramoin</title>
		<link>http://codingsense.wordpress.com/2009/06/16/multiple-list-left-join-in-linq/#comment-148</link>
		<dc:creator>bramoin</dc:creator>
		<pubDate>Tue, 01 Sep 2009 21:35:00 +0000</pubDate>
		<guid isPermaLink="false">http://codingsense.wordpress.com/2009/06/16/multiple-list-left-join-in-linq/#comment-148</guid>
		<description>Hi,
In your example for left join with multiple lists, it is easy when the class has a one or two members but if the class is large, how do you specify the whole thing rather than writing each one out. I am referring to the line below in the code segment that begins with &lt;&lt;&lt;. (See below)

var MultipleListJoin = from empdept in
                                   (from emp in ListOfEmployees
join dept in ListOfDepartment
on emp.DeptID equals dept.ID into JoinedEmpDept
from dept in JoinedEmpDept.DefaultIfEmpty()
select new                                    
{
EmployeeName = emp.Name, &lt;&lt;&lt; here you just want all the members in the emp, how do you specify that?
BranchID = dept != null ? dept.BranchID : 0,
DepartmentName = dept != null ? dept.Name : null                                    
})
join branch in ListOfBranch on
                               empdept.BranchID equals branch.ID into JoinedwithBranch
from branch in JoinedwithBranch.DefaultIfEmpty()
select new                               
{
EmpName = empdept.EmployeeName,
DeptName = empdept.DepartmentName,
BranchName = branch != null ? branch.Name : string.Empty
};

thank you,
bramoin</description>
		<content:encoded><![CDATA[<p>Hi,<br />
In your example for left join with multiple lists, it is easy when the class has a one or two members but if the class is large, how do you specify the whole thing rather than writing each one out. I am referring to the line below in the code segment that begins with &lt;&lt;&lt;. (See below)</p>
<p>var MultipleListJoin = from empdept in<br />
                                   (from emp in ListOfEmployees<br />
join dept in ListOfDepartment<br />
on emp.DeptID equals dept.ID into JoinedEmpDept<br />
from dept in JoinedEmpDept.DefaultIfEmpty()<br />
select new<br />
{<br />
EmployeeName = emp.Name, &lt;&lt;&lt; here you just want all the members in the emp, how do you specify that?<br />
BranchID = dept != null ? dept.BranchID : 0,<br />
DepartmentName = dept != null ? dept.Name : null<br />
})<br />
join branch in ListOfBranch on<br />
                               empdept.BranchID equals branch.ID into JoinedwithBranch<br />
from branch in JoinedwithBranch.DefaultIfEmpty()<br />
select new<br />
{<br />
EmpName = empdept.EmployeeName,<br />
DeptName = empdept.DepartmentName,<br />
BranchName = branch != null ? branch.Name : string.Empty<br />
};</p>
<p>thank you,<br />
bramoin</p>
]]></content:encoded>
	</item>
</channel>
</rss>
