<?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/"
		>
<channel>
	<title>Comments on: Dynamically Build LINQ Queries Using Reflection</title>
	<atom:link href="http://www.emadibrahim.com/2008/05/12/dynamically-build-linq-queries-using-reflection/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.emadibrahim.com/2008/05/12/dynamically-build-linq-queries-using-reflection/</link>
	<description>web development, tech reviews, tips, tricks, blogging</description>
	<lastBuildDate>Sun, 07 Mar 2010 18:27:34 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: eibrahim</title>
		<link>http://www.emadibrahim.com/2008/05/12/dynamically-build-linq-queries-using-reflection/comment-page-1/#comment-919</link>
		<dc:creator>eibrahim</dc:creator>
		<pubDate>Wed, 14 Oct 2009 19:20:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.emadibrahim.com/2008/05/12/dynamically-build-linq-queries-using-reflection/#comment-919</guid>
		<description>Honestly, it has been so long since I posted this and I can&#039;t remember but&lt;br&gt;if you do find, please come back and let us know.  It will help future&lt;br&gt;readers.&lt;br&gt;Thanks.</description>
		<content:encoded><![CDATA[<p>Honestly, it has been so long since I posted this and I can&#39;t remember but<br />if you do find, please come back and let us know.  It will help future<br />readers.<br />Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: eibrahim</title>
		<link>http://www.emadibrahim.com/2008/05/12/dynamically-build-linq-queries-using-reflection/comment-page-1/#comment-870</link>
		<dc:creator>eibrahim</dc:creator>
		<pubDate>Wed, 14 Oct 2009 12:20:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.emadibrahim.com/2008/05/12/dynamically-build-linq-queries-using-reflection/#comment-870</guid>
		<description>Honestly, it has been so long since I posted this and I can&#039;t remember but&lt;br&gt;if you do find, please come back and let us know.  It will help future&lt;br&gt;readers.&lt;br&gt;Thanks.</description>
		<content:encoded><![CDATA[<p>Honestly, it has been so long since I posted this and I can&#39;t remember but<br />if you do find, please come back and let us know.  It will help future<br />readers.<br />Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kashifpervaiz</title>
		<link>http://www.emadibrahim.com/2008/05/12/dynamically-build-linq-queries-using-reflection/comment-page-1/#comment-869</link>
		<dc:creator>kashifpervaiz</dc:creator>
		<pubDate>Mon, 12 Oct 2009 17:19:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.emadibrahim.com/2008/05/12/dynamically-build-linq-queries-using-reflection/#comment-869</guid>
		<description>Nice article.  Quick question:  if i want to pass the results of the query which is in data access layer to business then to UI, what would be the return type?</description>
		<content:encoded><![CDATA[<p>Nice article.  Quick question:  if i want to pass the results of the query which is in data access layer to business then to UI, what would be the return type?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Emad Ibrahim</title>
		<link>http://www.emadibrahim.com/2008/05/12/dynamically-build-linq-queries-using-reflection/comment-page-1/#comment-227</link>
		<dc:creator>Emad Ibrahim</dc:creator>
		<pubDate>Sat, 17 May 2008 11:49:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.emadibrahim.com/2008/05/12/dynamically-build-linq-queries-using-reflection/#comment-227</guid>
		<description>@mark: Thanks for pointing out the Translate() method, I looked into it and that wouldn&#039;t solve my problem.  For starters using reflection works well for me because I can dynamically populate the list of columns in a checkboxlist and then dynamically create the LINQ query...

Using reflection and custom attribute also allowed me to specify which columns can be exported and which ones can&#039;t.  So that alone, would prevent me from using regular sql strings and executing on a command.

On the other hand, you are right, almost everything I did could have been done with a sql string and a command but where is the fun in that :)

Thanks for the string.Join...  I am embarrassed to say that I have never used it before and looking at your code snippet - I LOVE IT.</description>
		<content:encoded><![CDATA[<p>@mark: Thanks for pointing out the Translate() method, I looked into it and that wouldn&#8217;t solve my problem.  For starters using reflection works well for me because I can dynamically populate the list of columns in a checkboxlist and then dynamically create the LINQ query&#8230;</p>
<p>Using reflection and custom attribute also allowed me to specify which columns can be exported and which ones can&#8217;t.  So that alone, would prevent me from using regular sql strings and executing on a command.</p>
<p>On the other hand, you are right, almost everything I did could have been done with a sql string and a command but where is the fun in that :)</p>
<p>Thanks for the string.Join&#8230;  I am embarrassed to say that I have never used it before and looking at your code snippet &#8211; I LOVE IT.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Emad Ibrahim</title>
		<link>http://www.emadibrahim.com/2008/05/12/dynamically-build-linq-queries-using-reflection/comment-page-1/#comment-428</link>
		<dc:creator>Emad Ibrahim</dc:creator>
		<pubDate>Sat, 17 May 2008 09:49:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.emadibrahim.com/2008/05/12/dynamically-build-linq-queries-using-reflection/#comment-428</guid>
		<description>@mark: Thanks for pointing out the Translate() method, I looked into it and that wouldn&#039;t solve my problem.  For starters using reflection works well for me because I can dynamically populate the list of columns in a checkboxlist and then dynamically create the LINQ query...&lt;br&gt;&lt;br&gt;Using reflection and custom attribute also allowed me to specify which columns can be exported and which ones can&#039;t.  So that alone, would prevent me from using regular sql strings and executing on a command.&lt;br&gt;&lt;br&gt;On the other hand, you are right, almost everything I did could have been done with a sql string and a command but where is the fun in that :)&lt;br&gt;&lt;br&gt;Thanks for the string.Join...  I am embarrassed to say that I have never used it before and looking at your code snippet - I LOVE IT.</description>
		<content:encoded><![CDATA[<p>@mark: Thanks for pointing out the Translate() method, I looked into it and that wouldn&#8217;t solve my problem.  For starters using reflection works well for me because I can dynamically populate the list of columns in a checkboxlist and then dynamically create the LINQ query&#8230;</p>
<p>Using reflection and custom attribute also allowed me to specify which columns can be exported and which ones can&#8217;t.  So that alone, would prevent me from using regular sql strings and executing on a command.</p>
<p>On the other hand, you are right, almost everything I did could have been done with a sql string and a command but where is the fun in that :)</p>
<p>Thanks for the string.Join&#8230;  I am embarrassed to say that I have never used it before and looking at your code snippet &#8211; I LOVE IT.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark S. Rasmussen</title>
		<link>http://www.emadibrahim.com/2008/05/12/dynamically-build-linq-queries-using-reflection/comment-page-1/#comment-223</link>
		<dc:creator>Mark S. Rasmussen</dc:creator>
		<pubDate>Thu, 15 May 2008 18:10:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.emadibrahim.com/2008/05/12/dynamically-build-linq-queries-using-reflection/#comment-223</guid>
		<description>I see that you do not need a strongly typed result at all which&#039;ll also render DataContext.Translate() unnessesary. Why go through this hassle and not just execute a command directly?</description>
		<content:encoded><![CDATA[<p>I see that you do not need a strongly typed result at all which&#8217;ll also render DataContext.Translate() unnessesary. Why go through this hassle and not just execute a command directly?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark S. Rasmussen</title>
		<link>http://www.emadibrahim.com/2008/05/12/dynamically-build-linq-queries-using-reflection/comment-page-1/#comment-222</link>
		<dc:creator>Mark S. Rasmussen</dc:creator>
		<pubDate>Thu, 15 May 2008 18:03:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.emadibrahim.com/2008/05/12/dynamically-build-linq-queries-using-reflection/#comment-222</guid>
		<description>I don&#039;t get it. How is this preferred over just doing a DataContext.Translate()?

Also, your dynamicClass string generation could be rewritten as a much simpler one-liner:
string dynamicClass = &quot;new(&quot; + string.Join(&quot;,&quot;, columnsToExport) + &quot;)&quot;;

I&#039;m assuming you validate for a positive number of selected columns somewhere else.</description>
		<content:encoded><![CDATA[<p>I don&#8217;t get it. How is this preferred over just doing a DataContext.Translate()?</p>
<p>Also, your dynamicClass string generation could be rewritten as a much simpler one-liner:<br />
string dynamicClass = &#8220;new(&#8221; + string.Join(&#8220;,&#8221;, columnsToExport) + &#8220;)&#8221;;</p>
<p>I&#8217;m assuming you validate for a positive number of selected columns somewhere else.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark S. Rasmussen</title>
		<link>http://www.emadibrahim.com/2008/05/12/dynamically-build-linq-queries-using-reflection/comment-page-1/#comment-427</link>
		<dc:creator>Mark S. Rasmussen</dc:creator>
		<pubDate>Thu, 15 May 2008 16:10:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.emadibrahim.com/2008/05/12/dynamically-build-linq-queries-using-reflection/#comment-427</guid>
		<description>I see that you do not need a strongly typed result at all which&#039;ll also render DataContext.Translate() unnessesary. Why go through this hassle and not just execute a command directly?</description>
		<content:encoded><![CDATA[<p>I see that you do not need a strongly typed result at all which&#8217;ll also render DataContext.Translate() unnessesary. Why go through this hassle and not just execute a command directly?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark S. Rasmussen</title>
		<link>http://www.emadibrahim.com/2008/05/12/dynamically-build-linq-queries-using-reflection/comment-page-1/#comment-426</link>
		<dc:creator>Mark S. Rasmussen</dc:creator>
		<pubDate>Thu, 15 May 2008 16:03:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.emadibrahim.com/2008/05/12/dynamically-build-linq-queries-using-reflection/#comment-426</guid>
		<description>I don&#039;t get it. How is this preferred over just doing a DataContext.Translate()?&lt;br&gt;&lt;br&gt;Also, your dynamicClass string generation could be rewritten as a much simpler one-liner:&lt;br&gt;string dynamicClass = &quot;new(&quot; + string.Join(&quot;,&quot;, columnsToExport) + &quot;)&quot;;&lt;br&gt;&lt;br&gt;I&#039;m assuming you validate for a positive number of selected columns somewhere else.</description>
		<content:encoded><![CDATA[<p>I don&#8217;t get it. How is this preferred over just doing a DataContext.Translate()?</p>
<p>Also, your dynamicClass string generation could be rewritten as a much simpler one-liner:<br />string dynamicClass = &#8220;new(&#8221; + string.Join(&#8220;,&#8221;, columnsToExport) + &#8220;)&#8221;;</p>
<p>I&#8217;m assuming you validate for a positive number of selected columns somewhere else.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
