<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Set Based Operations in Ado.net Data Services</title><link>http://blogs.msdn.com/phaniraj/archive/2008/07/17/set-based-operations-in-ado-net-data-services.aspx</link><description>Today's Post is co-Authored by Linq Ninja and my Colleague Marcelo Linq to Astoria does not support Set based queries , which means that this query is invalid List&amp;lt; string &amp;gt; citiesIWillVisit = new List&amp;lt; string &amp;gt;(){ "London" , "Berlin" , "Prague"</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title> &amp;raquo; Set Based Operations in Ado.net Data Services</title><link>http://blogs.msdn.com/phaniraj/archive/2008/07/17/set-based-operations-in-ado-net-data-services.aspx#8743413</link><pubDate>Thu, 17 Jul 2008 14:20:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8743413</guid><dc:creator> &amp;raquo; Set Based Operations in Ado.net Data Services</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://net.blogfeedsworld.com/?p=22343"&gt;http://net.blogfeedsworld.com/?p=22343&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>Building LINQ Expressions for ADO.NET Data Services</title><link>http://blogs.msdn.com/phaniraj/archive/2008/07/17/set-based-operations-in-ado-net-data-services.aspx#8745085</link><pubDate>Fri, 18 Jul 2008 01:49:32 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8745085</guid><dc:creator>Marcelo's WebLog</dc:creator><description>&lt;p&gt;While the 'LINQ Ninja' moniker is something that Phani completely made up on the spot and I actively&lt;/p&gt;
</description></item><item><title>re: Set Based Operations in Ado.net Data Services</title><link>http://blogs.msdn.com/phaniraj/archive/2008/07/17/set-based-operations-in-ado-net-data-services.aspx#8973074</link><pubDate>Thu, 02 Oct 2008 10:32:53 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8973074</guid><dc:creator>Joe</dc:creator><description>&lt;p&gt;Shouldn't it be possible to pass in the property to be filtered as an expression rather than a string, so that you retain intellisense support and compile-time validation? &amp;nbsp;As in:&lt;/p&gt;
&lt;p&gt;nwContext.Customers.IsIn&amp;lt;Customers&amp;gt;(citiesIWillVisit, (c) =&amp;gt; c.City);&lt;/p&gt;
&lt;p&gt;The extension method signature would become:&lt;/p&gt;
&lt;p&gt;public static IQueryable&amp;lt;T&amp;gt; IsIn&amp;lt;T&amp;gt;(this IQueryable&amp;lt;T&amp;gt; query, IEnumerable Set, Expression&amp;lt;Func&amp;lt;T, object&amp;gt;&amp;gt; Left)&lt;/p&gt;
&lt;p&gt;(Probably better to use IQueryable rather than DataServiceQuery, just in case you wanted to re-use this with another Linq provider that doesn't support Set-based 'In' clauses)&lt;/p&gt;
&lt;p&gt;And in the method you'd do:&lt;/p&gt;
&lt;p&gt;ParameterExpression param = Left.Parameters.Single();&lt;/p&gt;
&lt;p&gt;to bind your outer filter parameter with the inner property selector.&lt;/p&gt;</description></item><item><title>re: Set Based Operations in Ado.net Data Services</title><link>http://blogs.msdn.com/phaniraj/archive/2008/07/17/set-based-operations-in-ado-net-data-services.aspx#8973873</link><pubDate>Thu, 02 Oct 2008 19:29:43 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8973873</guid><dc:creator>PhaniRajuYN</dc:creator><description>&lt;p&gt;Hi Joe,&lt;/p&gt;
&lt;p&gt; That sounds like a neat idea.&lt;/p&gt;
&lt;p&gt; I shall try your suggestion and update the code snippet later&lt;/p&gt;
</description></item><item><title>Reporting with ADO.NET Data Services and Telerik Report Viewer</title><link>http://blogs.msdn.com/phaniraj/archive/2008/07/17/set-based-operations-in-ado-net-data-services.aspx#9585342</link><pubDate>Mon, 04 May 2009 08:00:12 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9585342</guid><dc:creator>With Great Power comes Great Response.write("Ability")</dc:creator><description>&lt;p&gt;Telerik has a range of controls that work with ADO.NET Data Services as the data source . Take a look&lt;/p&gt;
</description></item><item><title>re: Set Based Operations in Ado.net Data Services</title><link>http://blogs.msdn.com/phaniraj/archive/2008/07/17/set-based-operations-in-ado-net-data-services.aspx#9638997</link><pubDate>Sun, 24 May 2009 17:51:29 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9638997</guid><dc:creator>ibebbs</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Is there any way to extend the above method to use a Contains expression (ultimately translating to a 'substringof' query) instead of an Equals?&lt;/p&gt;
&lt;p&gt;I am able to generate the expression I want by manually building the query string - enumerate around the enumerable set or'ing together 'substringof('{0}', property)' - but can't seem to generate the expression that equates to this query.&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt; &amp;nbsp;Ian&lt;/p&gt;</description></item><item><title>Set Based Operations in Ado.net Data Services Part II</title><link>http://blogs.msdn.com/phaniraj/archive/2008/07/17/set-based-operations-in-ado-net-data-services.aspx#9643662</link><pubDate>Wed, 27 May 2009 08:59:13 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9643662</guid><dc:creator>With Great Power comes Great Response.write("Ability")</dc:creator><description>&lt;p&gt;As an extension to explained in the last blog post dealing with Set based filter operations in our client&lt;/p&gt;
</description></item><item><title>re: Set Based Operations in Ado.net Data Services</title><link>http://blogs.msdn.com/phaniraj/archive/2008/07/17/set-based-operations-in-ado-net-data-services.aspx#9861058</link><pubDate>Sat, 08 Aug 2009 09:19:40 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9861058</guid><dc:creator>Scott Burkhalter</dc:creator><description>&lt;P&gt;Very cool extension method, thanks for sharing!&lt;/P&gt;
&lt;P&gt;Noticed a small typo:&lt;/P&gt;
&lt;P&gt;ParameterExpression param = propertyExpression.Paramters.Single();&lt;/P&gt;
&lt;P&gt;should read:&lt;/P&gt;
&lt;P&gt;ParameterExpression param = propertyExpression.Parameters.Single();&lt;/P&gt;</description></item><item><title>re: Set Based Operations in Ado.net Data Services</title><link>http://blogs.msdn.com/phaniraj/archive/2008/07/17/set-based-operations-in-ado-net-data-services.aspx#9861506</link><pubDate>Sat, 08 Aug 2009 19:54:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9861506</guid><dc:creator>PhaniRajuYN</dc:creator><description>&lt;p&gt;Fixed, thanks for correcting this Scott!&lt;/p&gt;
</description></item></channel></rss>