<?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: My first LINQ Experience. How to do a simple COUNT() with LINQ to SQL</title>
	<atom:link href="http://peterkellner.net/2007/12/24/linqcountfirsttime/feed/" rel="self" type="application/rss+xml" />
	<link>http://peterkellner.net/2007/12/24/linqcountfirsttime/</link>
	<description>Specializing in Microsoft Web and Database Technologies</description>
	<lastBuildDate>Fri, 30 Jul 2010 08:27:22 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Luisnet</title>
		<link>http://peterkellner.net/2007/12/24/linqcountfirsttime/comment-page-1/#comment-25170</link>
		<dc:creator>Luisnet</dc:creator>
		<pubDate>Sat, 25 Jul 2009 04:47:58 +0000</pubDate>
		<guid isPermaLink="false">http://peterkellner.net/2007/12/24/linqcountfirsttime/#comment-25170</guid>
		<description>Thank you for the explanation...</description>
		<content:encoded><![CDATA[<p>Thank you for the explanation&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PRMan</title>
		<link>http://peterkellner.net/2007/12/24/linqcountfirsttime/comment-page-1/#comment-675</link>
		<dc:creator>PRMan</dc:creator>
		<pubDate>Thu, 14 Feb 2008 21:30:30 +0000</pubDate>
		<guid isPermaLink="false">http://peterkellner.net/2007/12/24/linqcountfirsttime/#comment-675</guid>
		<description>return (int)SqlHelper.ExecuteScalar(connectionString, &quot;select count(*) from content where IsDirectory = 1 and id = @id&quot;) == 0;

That&#039;s a single line.

And does the LINQ implementation send a full query or just a count query?  That can be a big waste, especially if this is called often.

I would probably be caching this item as well.</description>
		<content:encoded><![CDATA[<p>return (int)SqlHelper.ExecuteScalar(connectionString, &#8220;select count(*) from content where IsDirectory = 1 and id = @id&#8221;) == 0;</p>
<p>That&#8217;s a single line.</p>
<p>And does the LINQ implementation send a full query or just a count query?  That can be a big waste, especially if this is called often.</p>
<p>I would probably be caching this item as well.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced) (user agent is rejected)
Database Caching 1/13 queries in 0.011 seconds using disk
Content Delivery Network via cdn.peterkellner.net

Served from: peterkellner.net @ 2010-07-30 09:29:47 -->