<?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: Is it a good idea to use lambda expressions for querying SharePoint data?</title>
	<atom:link href="http://blog.mastykarz.nl/lambda-expressions-querying-sharepoint-data/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.mastykarz.nl/lambda-expressions-querying-sharepoint-data/</link>
	<description>Innovation Matters &#124; SharePoint Server MVP &#124; ISSN 2210-9390</description>
	<lastBuildDate>Thu, 09 Feb 2012 05:22:29 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Waldek Mastykarz</title>
		<link>http://blog.mastykarz.nl/lambda-expressions-querying-sharepoint-data/comment-page-1/#comment-115115</link>
		<dc:creator>Waldek Mastykarz</dc:creator>
		<pubDate>Thu, 05 Jan 2012 06:05:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mastykarz.nl/lambda-expressions-querying-sharepoint-data/#comment-115115</guid>
		<description>@tareq: Sorry, but I don&#039;t really understand what you are trying to achieve. Could you explain it a little more?</description>
		<content:encoded><![CDATA[<p>@tareq: Sorry, but I don&#039;t really understand what you are trying to achieve. Could you explain it a little more?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tareq</title>
		<link>http://blog.mastykarz.nl/lambda-expressions-querying-sharepoint-data/comment-page-1/#comment-115025</link>
		<dc:creator>tareq</dc:creator>
		<pubDate>Wed, 04 Jan 2012 19:54:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mastykarz.nl/lambda-expressions-querying-sharepoint-data/#comment-115025</guid>
		<description>dear Waled,
i have a case that confused me a bit , i have an a list with main category (4 cat.) and sub category (about 12 sub cat ) now i want to filter it to those cats. , is good to have multiple camel query ( one query for each cat.) or would it be better to get all items in one SPItemCOllection and handle the filtering in my code ?</description>
		<content:encoded><![CDATA[<p>dear Waled,<br />
i have a case that confused me a bit , i have an a list with main category (4 cat.) and sub category (about 12 sub cat ) now i want to filter it to those cats. , is good to have multiple camel query ( one query for each cat.) or would it be better to get all items in one SPItemCOllection and handle the filtering in my code ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Waldek Mastykarz</title>
		<link>http://blog.mastykarz.nl/lambda-expressions-querying-sharepoint-data/comment-page-1/#comment-39970</link>
		<dc:creator>Waldek Mastykarz</dc:creator>
		<pubDate>Tue, 12 Jan 2010 09:13:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mastykarz.nl/lambda-expressions-querying-sharepoint-data/#comment-39970</guid>
		<description>@Simon: I would definitely agree that it wouldn&#039;t be a good idea to use PortalSiteMapProvider for querying 10 items. What you always could do is to program both routines and then abstract them to a single method which would allow you to switch with a single button click/property change.</description>
		<content:encoded><![CDATA[<p>@Simon: I would definitely agree that it wouldn&#039;t be a good idea to use PortalSiteMapProvider for querying 10 items. What you always could do is to program both routines and then abstract them to a single method which would allow you to switch with a single button click/property change.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Simon</title>
		<link>http://blog.mastykarz.nl/lambda-expressions-querying-sharepoint-data/comment-page-1/#comment-39965</link>
		<dc:creator>Simon</dc:creator>
		<pubDate>Tue, 12 Jan 2010 08:45:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mastykarz.nl/lambda-expressions-querying-sharepoint-data/#comment-39965</guid>
		<description>ah nice one, always one step ahead ;)

The tough part is working out if the PortalSiteMapProvider is the right choice before you know the volumes. 
But thats why I like to use the SiteDataQuery as its used in both the SPWeb.GetSiteData and the PortalSiteMapProvider.GetCachedSiteDataQuery so you can easy switch between the 2 without too much work, also as I can see it performs well :)</description>
		<content:encoded><![CDATA[<p>ah nice one, always one step ahead ;)</p>
<p>The tough part is working out if the PortalSiteMapProvider is the right choice before you know the volumes.<br />
But thats why I like to use the SiteDataQuery as its used in both the SPWeb.GetSiteData and the PortalSiteMapProvider.GetCachedSiteDataQuery so you can easy switch between the 2 without too much work, also as I can see it performs well :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Waldek Mastykarz</title>
		<link>http://blog.mastykarz.nl/lambda-expressions-querying-sharepoint-data/comment-page-1/#comment-39949</link>
		<dc:creator>Waldek Mastykarz</dc:creator>
		<pubDate>Tue, 12 Jan 2010 06:20:53 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mastykarz.nl/lambda-expressions-querying-sharepoint-data/#comment-39949</guid>
		<description>@Simon: Thanks for the tip. Have you seen this one: &lt;a href=&quot;/performance-of-content-aggregation-queries-on-multiple-lists-revisited/&quot; rel=&quot;nofollow&quot;&gt;Performance of content aggregation queries on multiple lists revisited&lt;/a&gt;?</description>
		<content:encoded><![CDATA[<p>@Simon: Thanks for the tip. Have you seen this one: <a href="/performance-of-content-aggregation-queries-on-multiple-lists-revisited/" rel="nofollow">Performance of content aggregation queries on multiple lists revisited</a>?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Simon Ovens</title>
		<link>http://blog.mastykarz.nl/lambda-expressions-querying-sharepoint-data/comment-page-1/#comment-39939</link>
		<dc:creator>Simon Ovens</dc:creator>
		<pubDate>Tue, 12 Jan 2010 02:57:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mastykarz.nl/lambda-expressions-querying-sharepoint-data/#comment-39939</guid>
		<description>Great Post!

Another useful comparison and it would be good to know is:
-SiteDataQuery and PortalSiteMapProvider
vs
- CrossListQueryInfo and CrossListQueryCache

hint hint :)</description>
		<content:encoded><![CDATA[<p>Great Post!</p>
<p>Another useful comparison and it would be good to know is:<br />
-SiteDataQuery and PortalSiteMapProvider<br />
vs<br />
- CrossListQueryInfo and CrossListQueryCache</p>
<p>hint hint :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Simon Ovens</title>
		<link>http://blog.mastykarz.nl/lambda-expressions-querying-sharepoint-data/comment-page-1/#comment-39927</link>
		<dc:creator>Simon Ovens</dc:creator>
		<pubDate>Mon, 11 Jan 2010 23:57:15 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mastykarz.nl/lambda-expressions-querying-sharepoint-data/#comment-39927</guid>
		<description>Great Post! 

Another comparison which would be useful and good to know is which of the following 2 is faster - SiteDataQuery with the PortalSiteMapProvider or CrossListQueryInfo with CrossListQueryCache 

Of course it would have to be over a period of time so that the caching is utilised.</description>
		<content:encoded><![CDATA[<p>Great Post! </p>
<p>Another comparison which would be useful and good to know is which of the following 2 is faster &#8211; SiteDataQuery with the PortalSiteMapProvider or CrossListQueryInfo with CrossListQueryCache </p>
<p>Of course it would have to be over a period of time so that the caching is utilised.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marius C.</title>
		<link>http://blog.mastykarz.nl/lambda-expressions-querying-sharepoint-data/comment-page-1/#comment-14929</link>
		<dc:creator>Marius C.</dc:creator>
		<pubDate>Thu, 02 Apr 2009 18:47:43 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mastykarz.nl/lambda-expressions-querying-sharepoint-data/#comment-14929</guid>
		<description>Correcting the correction....is not me...is the publishing interface that strips out the generic part (it looks like HTML tag :D), so I add it in old plain HTML &lt;SPListItem&gt; and for the 2nd example &lt;SPList&gt;</description>
		<content:encoded><![CDATA[<p>Correcting the correction&#8230;.is not me&#8230;is the publishing interface that strips out the generic part (it looks like HTML tag :D), so I add it in old plain HTML &lt;SPListItem&gt; and for the 2nd example &lt;SPList&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marius C.</title>
		<link>http://blog.mastykarz.nl/lambda-expressions-querying-sharepoint-data/comment-page-1/#comment-14928</link>
		<dc:creator>Marius C.</dc:creator>
		<pubDate>Thu, 02 Apr 2009 18:44:39 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mastykarz.nl/lambda-expressions-querying-sharepoint-data/#comment-14928</guid>
		<description>Yes, indeed you are right about CrossListQueryInfo! To answer your question i need to complete my piece of code as in hurry i forgot one important aspect (the generic part ), So here the correction:
SPContext.Current.Web.Lists[&quot;My List&quot;].Cast().Where(item=&gt;item[&quot;Title&quot;].Contains(&quot;My Filter Key&quot;));

Also, as a slight variation, i&#039;ve been using the following to retrieve all the lists that contain a specific ContentType (you can imagine complex queries with multiple where clauses, etc...limited just by the need, imagination..and not ultimatelly the performance degradation in some cases!!):

//see here that we use SPList, instead of SPListItem
SPContext.Current.Web.Lists.Cast().Where(item=&gt;item[&quot;ContentType&quot;].Contains(&quot;My Content TypeName &quot;));</description>
		<content:encoded><![CDATA[<p>Yes, indeed you are right about CrossListQueryInfo! To answer your question i need to complete my piece of code as in hurry i forgot one important aspect (the generic part ), So here the correction:<br />
SPContext.Current.Web.Lists["My List"].Cast().Where(item=&gt;item["Title"].Contains(&#034;My Filter Key&#034;));</p>
<p>Also, as a slight variation, i&#039;ve been using the following to retrieve all the lists that contain a specific ContentType (you can imagine complex queries with multiple where clauses, etc&#8230;limited just by the need, imagination..and not ultimatelly the performance degradation in some cases!!):</p>
<p>//see here that we use SPList, instead of SPListItem<br />
SPContext.Current.Web.Lists.Cast().Where(item=&gt;item["ContentType"].Contains(&#034;My Content TypeName &#034;));</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Waldek Mastykarz</title>
		<link>http://blog.mastykarz.nl/lambda-expressions-querying-sharepoint-data/comment-page-1/#comment-14921</link>
		<dc:creator>Waldek Mastykarz</dc:creator>
		<pubDate>Thu, 02 Apr 2009 16:41:32 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mastykarz.nl/lambda-expressions-querying-sharepoint-data/#comment-14921</guid>
		<description>@Marius C.: CrossListQueryInfo is a little bit better than any other querying method. The downside is though, that it&#039;s only available in MOSS, so if you&#039;re using WSS you should have to fall back to one of the &#039;basic&#039; classes like SPSiteDataQuery or SPQuery.
As for the lambda expression: I haven&#039;t tried running the query in such manner. What I miss though is: how the lambda expression would know that you actually want to access the Items property of SPList?</description>
		<content:encoded><![CDATA[<p>@Marius C.: CrossListQueryInfo is a little bit better than any other querying method. The downside is though, that it&#039;s only available in MOSS, so if you&#039;re using WSS you should have to fall back to one of the &#039;basic&#039; classes like SPSiteDataQuery or SPQuery.<br />
As for the lambda expression: I haven&#039;t tried running the query in such manner. What I miss though is: how the lambda expression would know that you actually want to access the Items property of SPList?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

