<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.2.3" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: Achieving POCO s in Linq to SQL</title>
	<link>http://www.sidarok.com/web/blog/content/2008/10/14/achieving-poco-s-in-linq-to-sql.html</link>
	<description>still believes in coding to make dreams come true</description>
	<pubDate>Thu, 11 Mar 2010 04:25:51 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.3</generator>

	<item>
		<title>By: slicky</title>
		<link>http://www.sidarok.com/web/blog/content/2008/10/14/achieving-poco-s-in-linq-to-sql.html#comment-12885</link>
		<dc:creator>slicky</dc:creator>
		<pubDate>Wed, 10 Mar 2010 20:15:45 +0000</pubDate>
		<guid>http://www.sidarok.com/web/blog/content/2008/10/14/achieving-poco-s-in-linq-to-sql.html#comment-12885</guid>
		<description>Gday, by the way I'm sorry, the english language is just not my main language. When looking at the web site My husband and i observed some sort of odd letters everywhere in the websites .  such as Attention: Cannot change header string ... and so forth. It's very likely me though, because I still had never time to update so am now making use of Opera 9.5 but my personal web-site &lt;a href="http://fastest-way-to-loseweight.info/" rel="nofollow"&gt;fastest way to lose weight &lt;/a&gt; and likewise important ones as as an example msn make me no problems, that being said that is a little bit abnormal.</description>
		<content:encoded><![CDATA[<p>Gday, by the way I&#8217;m sorry, the english language is just not my main language. When looking at the web site My husband and i observed some sort of odd letters everywhere in the websites .  such as Attention: Cannot change header string &#8230; and so forth. It&#8217;s very likely me though, because I still had never time to update so am now making use of Opera 9.5 but my personal web-site <a href="http://fastest-way-to-loseweight.info/" rel="nofollow" onclick="javascript:pageTracker._trackPageview('/outbound/comment/http://fastest-way-to-loseweight.info/');">fastest way to lose weight </a> and likewise important ones as as an example msn make me no problems, that being said that is a little bit abnormal.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: S is for… sqlmetal &#124; Coded Style</title>
		<link>http://www.sidarok.com/web/blog/content/2008/10/14/achieving-poco-s-in-linq-to-sql.html#comment-6392</link>
		<dc:creator>S is for… sqlmetal &#124; Coded Style</dc:creator>
		<pubDate>Mon, 11 May 2009 04:20:56 +0000</pubDate>
		<guid>http://www.sidarok.com/web/blog/content/2008/10/14/achieving-poco-s-in-linq-to-sql.html#comment-6392</guid>
		<description>[...] developers are strong proponents of POCO (Plain-old CLR classes) and would prefer to use classes that are not marked by the various [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] developers are strong proponents of POCO (Plain-old CLR classes) and would prefer to use classes that are not marked by the various [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sidar Ok</title>
		<link>http://www.sidarok.com/web/blog/content/2008/10/14/achieving-poco-s-in-linq-to-sql.html#comment-6284</link>
		<dc:creator>Sidar Ok</dc:creator>
		<pubDate>Sat, 25 Apr 2009 19:24:36 +0000</pubDate>
		<guid>http://www.sidarok.com/web/blog/content/2008/10/14/achieving-poco-s-in-linq-to-sql.html#comment-6284</guid>
		<description>@Chris,

If you set the load options to eager load, it is logic for the DataContext to perform a join between children and parents. Try doing context.Parents.Select() and context.Children.Select() separately and adding them on your own. This way, it will perform 2 seperate queries as you are looking for. 

But out of curiosity, why do you want to perform a retrieve both on children and parents and not do a join ? What's the requirement ?

Thanks,

Sidar</description>
		<content:encoded><![CDATA[<p>@Chris,</p>
<p>If you set the load options to eager load, it is logic for the DataContext to perform a join between children and parents. Try doing context.Parents.Select() and context.Children.Select() separately and adding them on your own. This way, it will perform 2 seperate queries as you are looking for. </p>
<p>But out of curiosity, why do you want to perform a retrieve both on children and parents and not do a join ? What&#8217;s the requirement ?</p>
<p>Thanks,</p>
<p>Sidar</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://www.sidarok.com/web/blog/content/2008/10/14/achieving-poco-s-in-linq-to-sql.html#comment-6271</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Tue, 21 Apr 2009 20:51:19 +0000</pubDate>
		<guid>http://www.sidarok.com/web/blog/content/2008/10/14/achieving-poco-s-in-linq-to-sql.html#comment-6271</guid>
		<description>Sidar,

I ran SQL Profiler against a LINQ query similar to the one shown in your GetQuestion() implementation.  The generated sql is a join of the parent/child tables producing a single result set.  A row will be returned for each child and that row will include the parent info as well.  Sending the parent info over with each child seems unnecessary.  Is there a way to have LINQ generate multiple queries for a parent/child relationship?

Something like ...
select * from parent where parent_id = 1
select * from child where parent_id = 1     

Thanks,
Chris</description>
		<content:encoded><![CDATA[<p>Sidar,</p>
<p>I ran SQL Profiler against a LINQ query similar to the one shown in your GetQuestion() implementation.  The generated sql is a join of the parent/child tables producing a single result set.  A row will be returned for each child and that row will include the parent info as well.  Sending the parent info over with each child seems unnecessary.  Is there a way to have LINQ generate multiple queries for a parent/child relationship?</p>
<p>Something like &#8230;<br />
select * from parent where parent_id = 1<br />
select * from child where parent_id = 1     </p>
<p>Thanks,<br />
Chris</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sidar Ok</title>
		<link>http://www.sidarok.com/web/blog/content/2008/10/14/achieving-poco-s-in-linq-to-sql.html#comment-4366</link>
		<dc:creator>Sidar Ok</dc:creator>
		<pubDate>Sat, 29 Nov 2008 12:42:34 +0000</pubDate>
		<guid>http://www.sidarok.com/web/blog/content/2008/10/14/achieving-poco-s-in-linq-to-sql.html#comment-4366</guid>
		<description>Hi Matt,

After our conversation with the mail, did the point I suggested work ? If it did, could you post it here?

Thanks,

Sidar</description>
		<content:encoded><![CDATA[<p>Hi Matt,</p>
<p>After our conversation with the mail, did the point I suggested work ? If it did, could you post it here?</p>
<p>Thanks,</p>
<p>Sidar</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt</title>
		<link>http://www.sidarok.com/web/blog/content/2008/10/14/achieving-poco-s-in-linq-to-sql.html#comment-3834</link>
		<dc:creator>Matt</dc:creator>
		<pubDate>Wed, 19 Nov 2008 08:36:06 +0000</pubDate>
		<guid>http://www.sidarok.com/web/blog/content/2008/10/14/achieving-poco-s-in-linq-to-sql.html#comment-3834</guid>
		<description>Hi Sidar,

I've been using your blog post as a guide to implementing POCO with LINQToSQL in my own solution, but am having some troubles with nested list.

Would it be possible for you to have a look at my StackOverflow question and pass on any guidance you can?

It would be muchly appreciated as I'm now at the point of pulling my hair out.

Regards,

Matt

http://stackoverflow.com/questions/298162/help-needed-for-linq-to-sql-operations-insertupdate-with-nested-pocos</description>
		<content:encoded><![CDATA[<p>Hi Sidar,</p>
<p>I&#8217;ve been using your blog post as a guide to implementing POCO with LINQToSQL in my own solution, but am having some troubles with nested list.</p>
<p>Would it be possible for you to have a look at my StackOverflow question and pass on any guidance you can?</p>
<p>It would be muchly appreciated as I&#8217;m now at the point of pulling my hair out.</p>
<p>Regards,</p>
<p>Matt</p>
<p><a href="http://stackoverflow.com/questions/298162/help-needed-for-linq-to-sql-operations-insertupdate-with-nested-pocos" rel="nofollow" onclick="javascript:pageTracker._trackPageview('/outbound/comment/http://stackoverflow.com/questions/298162/help-needed-for-linq-to-sql-operations-insertupdate-with-nested-pocos');">http://stackoverflow.com/questions/298162/help-needed-for-linq-to-sql-operations-insertupdate-with-nested-pocos</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lazy Loading with Linq to SQL POCO s &#124; Sidar Ok Technical Blog !</title>
		<link>http://www.sidarok.com/web/blog/content/2008/10/14/achieving-poco-s-in-linq-to-sql.html#comment-2568</link>
		<dc:creator>Lazy Loading with Linq to SQL POCO s &#124; Sidar Ok Technical Blog !</dc:creator>
		<pubDate>Wed, 29 Oct 2008 01:41:44 +0000</pubDate>
		<guid>http://www.sidarok.com/web/blog/content/2008/10/14/achieving-poco-s-in-linq-to-sql.html#comment-2568</guid>
		<description>[...] About Sidar   Sidar Ok Technical Blog !               &#171; Achieving POCO s in Linq to SQL [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] About Sidar   Sidar Ok Technical Blog !               &laquo; Achieving POCO s in Linq to SQL [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sidar Ok</title>
		<link>http://www.sidarok.com/web/blog/content/2008/10/14/achieving-poco-s-in-linq-to-sql.html#comment-2508</link>
		<dc:creator>Sidar Ok</dc:creator>
		<pubDate>Mon, 27 Oct 2008 10:50:56 +0000</pubDate>
		<guid>http://www.sidarok.com/web/blog/content/2008/10/14/achieving-poco-s-in-linq-to-sql.html#comment-2508</guid>
		<description>Hi Russ,

Lately I have been spending a lot of time with that and bumping into the limitations of L2S development discrepencies. I will also discuss them in another blog post, but bear with me, I am close to there :)</description>
		<content:encoded><![CDATA[<p>Hi Russ,</p>
<p>Lately I have been spending a lot of time with that and bumping into the limitations of L2S development discrepencies. I will also discuss them in another blog post, but bear with me, I am close to there <img src='http://www.sidarok.com/web/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Russ Painter</title>
		<link>http://www.sidarok.com/web/blog/content/2008/10/14/achieving-poco-s-in-linq-to-sql.html#comment-2505</link>
		<dc:creator>Russ Painter</dc:creator>
		<pubDate>Mon, 27 Oct 2008 09:45:34 +0000</pubDate>
		<guid>http://www.sidarok.com/web/blog/content/2008/10/14/achieving-poco-s-in-linq-to-sql.html#comment-2505</guid>
		<description>Still anxiously awaiting your lazy loading solution.</description>
		<content:encoded><![CDATA[<p>Still anxiously awaiting your lazy loading solution.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sidar Ok</title>
		<link>http://www.sidarok.com/web/blog/content/2008/10/14/achieving-poco-s-in-linq-to-sql.html#comment-2411</link>
		<dc:creator>Sidar Ok</dc:creator>
		<pubDate>Fri, 24 Oct 2008 21:52:38 +0000</pubDate>
		<guid>http://www.sidarok.com/web/blog/content/2008/10/14/achieving-poco-s-in-linq-to-sql.html#comment-2411</guid>
		<description>@Corey,

Yes I did check out - It is a code generator, which generates another layer of mapping. Please see my response in the above comments to Rob on another layer of mapping. 

On top of them, EF is already very heavy with 2 levels of mapping, adding 3 rd level to this stack where I just need 1 level is an overkill and overhead. It is not a solution to the problem, it is just a *workaround*. And a work around that has all the problems inherently from code generation perspective, e.g source control nightmares, maintaining untested mappings, loads of classes that are not used, being bound to the generation technology etc. The more layers you are away from ORM's Context, less you get the goodies of it or depend on generation to get them - why would I, when I don't need to increase the distance ?

I still need to regen my Adapter layer and Proxies for lazy loading when a change occurs in the db, it is inevitable. So no positives on that side either. (btw, the amount of mapping you need to regen when db model changes in EF is already tremendous, not to mention the poco adapter). L2S is very easy and provides lots of flexibility in this context, does what it needs to, doesn't what it can't do good. 

On the other hand, I will keep an eye on your blog and already looking forward to the posts. Thanks for the comment.</description>
		<content:encoded><![CDATA[<p>@Corey,</p>
<p>Yes I did check out - It is a code generator, which generates another layer of mapping. Please see my response in the above comments to Rob on another layer of mapping. </p>
<p>On top of them, EF is already very heavy with 2 levels of mapping, adding 3 rd level to this stack where I just need 1 level is an overkill and overhead. It is not a solution to the problem, it is just a *workaround*. And a work around that has all the problems inherently from code generation perspective, e.g source control nightmares, maintaining untested mappings, loads of classes that are not used, being bound to the generation technology etc. The more layers you are away from ORM&#8217;s Context, less you get the goodies of it or depend on generation to get them - why would I, when I don&#8217;t need to increase the distance ?</p>
<p>I still need to regen my Adapter layer and Proxies for lazy loading when a change occurs in the db, it is inevitable. So no positives on that side either. (btw, the amount of mapping you need to regen when db model changes in EF is already tremendous, not to mention the poco adapter). L2S is very easy and provides lots of flexibility in this context, does what it needs to, doesn&#8217;t what it can&#8217;t do good. </p>
<p>On the other hand, I will keep an eye on your blog and already looking forward to the posts. Thanks for the comment.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
