<?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>Marcelo's WebLog : Astoria</title><link>http://blogs.msdn.com/marcelolr/archive/tags/Astoria/default.aspx</link><description>Tags: Astoria</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Download Data Services Update for .NET 3.5 SP1</title><link>http://blogs.msdn.com/marcelolr/archive/2009/12/17/download-data-services-update-for-net-3-5-sp1.aspx</link><pubDate>Thu, 17 Dec 2009 22:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9938310</guid><dc:creator>marcelolr</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/marcelolr/comments/9938310.aspx</comments><wfw:commentRss>http://blogs.msdn.com/marcelolr/commentrss.aspx?PostID=9938310</wfw:commentRss><description>&lt;P&gt;Yesterday the availability &lt;A href="http://blogs.msdn.com/astoriateam/archive/2009/12/16/data-services-update-for-net-3-5-sp1-now-available-for-download.aspx" mce_href="http://blogs.msdn.com/astoriateam/archive/2009/12/16/data-services-update-for-net-3-5-sp1-now-available-for-download.aspx"&gt;announcement&lt;/A&gt; went up on the team blog, so why wait? Get yourself some updated bits and start data binding, blob'ing, paging, projecting, and counting entities, all from within the comfort of your programming chair!&lt;/P&gt;
&lt;P&gt;If you haven't already, now is a great time to subscribe to the feed on the &lt;A href="http://blogs.msdn.com/astoriateam/default.aspx" mce_href="http://blogs.msdn.com/astoriateam/default.aspx"&gt;team blog&lt;/A&gt;. New content to help you make the most of the update will be posted regularly now that the release is out.&lt;/P&gt;
&lt;P&gt;Enjoy!&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9938310" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/marcelolr/archive/tags/Astoria/default.aspx">Astoria</category><category domain="http://blogs.msdn.com/marcelolr/archive/tags/ADO.NET+Data+Services/default.aspx">ADO.NET Data Services</category></item><item><title>Vistual Studio visualizer for OData</title><link>http://blogs.msdn.com/marcelolr/archive/2009/11/19/vistual-studio-visualizer-for-odata.aspx</link><pubDate>Thu, 19 Nov 2009 22:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9924569</guid><dc:creator>marcelolr</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/marcelolr/comments/9924569.aspx</comments><wfw:commentRss>http://blogs.msdn.com/marcelolr/commentrss.aspx?PostID=9924569</wfw:commentRss><description>&lt;P&gt;Fabian Winternitz is one of our awesome tools developers, and you can see some of his work in &lt;A href="http://blogs.msdn.com/astoriateam/archive/2009/11/17/introducing-the-microsoft-open-data-protocol-visualizer.aspx" mce_href="http://blogs.msdn.com/astoriateam/archive/2009/11/17/introducing-the-microsoft-open-data-protocol-visualizer.aspx"&gt;this post&lt;/A&gt;. That's a Visual Studio extension that will display searchable diagrams for the model exposed by any service endpoint that exposes OData metadata. Which these days includes &lt;A href="http://blogs.msdn.com/astoriateam/archive/2009/11/17/breaking-down-data-silos-the-open-data-protocol-odata.aspx" mce_href="http://blogs.msdn.com/astoriateam/archive/2009/11/17/breaking-down-data-silos-the-open-data-protocol-odata.aspx"&gt;a lot of software&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Personally, I think it's great to see on one hand the level of support for the ecosystem, and on the other hand the balance of power, expressiveness and simplicity that OData provides. Back when everything started in the early days of Project "Astoria", I don't think anyone had any idea as to how broad a spectrum of software components would play in this space, but it looks like sticking to simplicity and proven standards paid off.&lt;/P&gt;
&lt;P&gt;Enjoy!&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9924569" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/marcelolr/archive/tags/Development/default.aspx">Development</category><category domain="http://blogs.msdn.com/marcelolr/archive/tags/Astoria/default.aspx">Astoria</category><category domain="http://blogs.msdn.com/marcelolr/archive/tags/ADO.NET+Data+Services/default.aspx">ADO.NET Data Services</category></item><item><title>WCF Data Services</title><link>http://blogs.msdn.com/marcelolr/archive/2009/11/18/wcf-data-services.aspx</link><pubDate>Wed, 18 Nov 2009 22:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9924551</guid><dc:creator>marcelolr</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/marcelolr/comments/9924551.aspx</comments><wfw:commentRss>http://blogs.msdn.com/marcelolr/commentrss.aspx?PostID=9924551</wfw:commentRss><description>&lt;P&gt;Over at the team blog, you can find &lt;A href="http://blogs.msdn.com/astoriateam/archive/2009/11/17/simplifying-our-n-tier-development-platform-making-3-things-1-thing.aspx" mce_href="http://blogs.msdn.com/astoriateam/archive/2009/11/17/simplifying-our-n-tier-development-platform-making-3-things-1-thing.aspx"&gt;this post&lt;/A&gt; about ADO.NET Data Services changing its name to WCF Data Services in the .NET Framework 4 time frame. This is goodness by every account - over time, this just means a more integrated experience when developing for these stacks, with less seams and caveats.&lt;/P&gt;
&lt;P&gt;Enjoy! - in anticipation if nothing else :)&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9924551" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/marcelolr/archive/tags/Astoria/default.aspx">Astoria</category><category domain="http://blogs.msdn.com/marcelolr/archive/tags/ADO.NET+Data+Services/default.aspx">ADO.NET Data Services</category></item><item><title>Project Codename "Astoria Offline", Alpha Preview</title><link>http://blogs.msdn.com/marcelolr/archive/2009/03/10/project-codename-astoria-offline-alpha-preview.aspx</link><pubDate>Wed, 11 Mar 2009 00:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9463969</guid><dc:creator>marcelolr</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/marcelolr/comments/9463969.aspx</comments><wfw:commentRss>http://blogs.msdn.com/marcelolr/commentrss.aspx?PostID=9463969</wfw:commentRss><description>&lt;P&gt;&lt;A class="" href="http://blogs.msdn.com/astoriateam/archive/2009/03/07/announcing-project-codename-astoria-offline-alpha-preview.aspx" mce_href="http://blogs.msdn.com/astoriateam/archive/2009/03/07/announcing-project-codename-astoria-offline-alpha-preview.aspx "&gt;As recently announced&lt;/A&gt;, early preview bits are &lt;A class="" href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;amp;FamilyID=479f2216-e6f2-486f-80c9-2cfade5082c1" mce_href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;amp;FamilyID=479f2216-e6f2-486f-80c9-2cfade5082c1"&gt;available&lt;/A&gt; for Astoria that provide synchronization capabilities, which allow you to create applications that work offline (among other things).&lt;/P&gt;
&lt;P&gt;Note that this announcement was made close to the "1.5" made not too long ago, but they are separate, distinct things that will not play well if installed on the same machine. You really, really don't want to mix the two.&lt;/P&gt;
&lt;P&gt;The idea here is really to reach out, give people a feeling of what the problem space looks like and what a solution might look like, and help us get feedback and have a conversation around this. As usual, the &lt;A class="" href="http://blogs.msdn.com/astoriateam" mce_href="http://blogs.msdn.com/astoriateam"&gt;team blog&lt;/A&gt; and the &lt;A class="" href="http://social.msdn.microsoft.com/forums/en-US/adodotnetdataservices/threads" mce_href="http://social.msdn.microsoft.com/forums/en-US/adodotnetdataservices/threads"&gt;forums&lt;/A&gt; are your best friends.&lt;/P&gt;
&lt;P&gt;Enjoy!&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9463969" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/marcelolr/archive/tags/Astoria/default.aspx">Astoria</category><category domain="http://blogs.msdn.com/marcelolr/archive/tags/ADO.NET+Data+Services/default.aspx">ADO.NET Data Services</category></item><item><title>A plea for ADO.NET Data Services black belt</title><link>http://blogs.msdn.com/marcelolr/archive/2009/02/16/a-plea-for-ado-net-data-services-black-belt.aspx</link><pubDate>Tue, 17 Feb 2009 01:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9417695</guid><dc:creator>marcelolr</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/marcelolr/comments/9417695.aspx</comments><wfw:commentRss>http://blogs.msdn.com/marcelolr/commentrss.aspx?PostID=9417695</wfw:commentRss><description>&lt;P&gt;&lt;A class="" href="http://blogs.msdn.com/phaniraj/default.aspx" mce_href="http://blogs.msdn.com/phaniraj/default.aspx"&gt;Phani&lt;/A&gt;, master and commander of all things Astoria, has in his posession pictures of the latest ski trip... (yes, the team definitely knows how to have fun)&lt;/P&gt;
&lt;P&gt;This is just my way of publicly calling unto him to post them. Peer pressure in action!&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9417695" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/marcelolr/archive/tags/Astoria/default.aspx">Astoria</category><category domain="http://blogs.msdn.com/marcelolr/archive/tags/ADO.NET+Data+Services/default.aspx">ADO.NET Data Services</category></item><item><title>ADO.NET Data Services @ PDC</title><link>http://blogs.msdn.com/marcelolr/archive/2008/10/27/ado-net-data-services-pdc.aspx</link><pubDate>Mon, 27 Oct 2008 20:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9017024</guid><dc:creator>marcelolr</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/marcelolr/comments/9017024.aspx</comments><wfw:commentRss>http://blogs.msdn.com/marcelolr/commentrss.aspx?PostID=9017024</wfw:commentRss><description>&lt;P&gt;I am certain you ardently desire to keep up to date on everything Astoria (I mean, ADO.NET Data Services), so if you're going to the PDC, the sessions you'll want to go are listed &lt;A class="" href="http://blogs.msdn.com/astoriateam/archive/2008/10/24/see-you-at-pdc.aspx" mce_href="http://blogs.msdn.com/astoriateam/archive/2008/10/24/see-you-at-pdc.aspx"&gt;here&lt;/A&gt;, along with a video showing Pablo and Mike plugging them.&lt;/P&gt;
&lt;P&gt;I especially enjoy how the still frame always managed to catch Pablo in the most awkward pose possible.&lt;/P&gt;
&lt;P&gt;Enjoy!&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9017024" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/marcelolr/archive/tags/Astoria/default.aspx">Astoria</category><category domain="http://blogs.msdn.com/marcelolr/archive/tags/ADO.NET+Data+Services/default.aspx">ADO.NET Data Services</category></item><item><title>ADO.NET Data Services History</title><link>http://blogs.msdn.com/marcelolr/archive/2008/08/28/ado-net-data-services-history.aspx</link><pubDate>Fri, 29 Aug 2008 02:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8886557</guid><dc:creator>marcelolr</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/marcelolr/comments/8886557.aspx</comments><wfw:commentRss>http://blogs.msdn.com/marcelolr/commentrss.aspx?PostID=8886557</wfw:commentRss><description>&lt;P&gt;Pablo puts on his historian hat over at &lt;A href="http://blogs.msdn.com/pablo/archive/2008/08/20/timeline-of-project-astoria.aspx"&gt;http://blogs.msdn.com/pablo/archive/2008/08/20/timeline-of-project-astoria.aspx&lt;/A&gt;&amp;nbsp;and tells the tale of how Astoria (now ADO.NET Data Services) was born and raised.&lt;/P&gt;
&lt;P&gt;Some of my own memories:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;The very first mail on my 'Astoria' mail folder, sent to Pablo, titled &lt;EM&gt;Pinging for OOF message&lt;/EM&gt; (I guess he was out and I wanted to get his out of office message, which typically includes information as to when someone is coming back). He eventually replied nonetheless with instructions on the version control client configuration and a couple of links to documents that had already been prepared.&lt;/LI&gt;
&lt;LI&gt;Lovingly organizing our team's SharePoint Wiki. Today it has grown to 74 pages with all sorts of information, from links to the Microsoft download site for releases to tips on useful breakpoint locations.&lt;/LI&gt;
&lt;LI&gt;Everyone ordering copies of &lt;A class="" href="http://oreilly.com/catalog/9780596529260/" mce_href="http://oreilly.com/catalog/9780596529260/"&gt;RESTful Web Services&lt;/A&gt;, by Leonard Richarson and Sam Ruby. I somehow ended up with at least two copies at some point.&lt;/LI&gt;
&lt;LI&gt;The design marathon, which actually lasted longer than a month (in my mind, anyway). I remember we used to get together every other day for two to three hours to nail down the specifics of what we wanted.&lt;/LI&gt;
&lt;LI&gt;The people on the team. A great combination of being very smart, very easygoing and a lot of fun to work with. The &lt;A class="" href="http://blogs.msdn.com/astoriateam/archive/2008/01/25/resting-on-the-slopes.aspx" mce_href="http://blogs.msdn.com/astoriateam/archive/2008/01/25/resting-on-the-slopes.aspx"&gt;RESTing on the slopes&lt;/A&gt; pictures have achieved everlasting fame by now.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Good times! I can only hope that developers that use our platform have as much fun as we did creating it.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8886557" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/marcelolr/archive/tags/Development/default.aspx">Development</category><category domain="http://blogs.msdn.com/marcelolr/archive/tags/Astoria/default.aspx">Astoria</category><category domain="http://blogs.msdn.com/marcelolr/archive/tags/ADO.NET+Data+Services/default.aspx">ADO.NET Data Services</category></item><item><title>System.Data.Services</title><link>http://blogs.msdn.com/marcelolr/archive/2008/08/11/system-data-services.aspx</link><pubDate>Tue, 12 Aug 2008 05:29:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8849773</guid><dc:creator>marcelolr</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/marcelolr/comments/8849773.aspx</comments><wfw:commentRss>http://blogs.msdn.com/marcelolr/commentrss.aspx?PostID=8849773</wfw:commentRss><description>&lt;P&gt;The documentation is online... isn't this URI so very clean?&lt;/P&gt;
&lt;P&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/system.data.services.aspx" mce_href="http://msdn.microsoft.com/en-us/library/system.data.services.aspx"&gt;http://msdn.microsoft.com/en-us/library/system.data.services.aspx&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Here's the one-sentence-or-less explanation of what's in this namespace, to give you a sense of what's used where.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Setting Up Your Service&lt;/EM&gt;&lt;BR&gt;&lt;A class="" href="http://msdn.microsoft.com/en-us/library/cc646779.aspx" mce_href="http://msdn.microsoft.com/en-us/library/cc646779.aspx"&gt;DataService&amp;lt;T&amp;gt;&lt;/A&gt; is the class that is typically subclassed, using the data source type as the 'T' type parameter, and brings everything together.&lt;/P&gt;
&lt;P&gt;&lt;A class="" href="http://msdn.microsoft.com/en-us/library/system.data.services.queryinterceptorattribute.aspx" mce_href="http://msdn.microsoft.com/en-us/library/system.data.services.queryinterceptorattribute.aspx"&gt;QueryInterceptorAttribute&lt;/A&gt; and &lt;A class="" href="http://msdn.microsoft.com/en-us/library/system.data.services.changeinterceptorattribute.aspx" mce_href="http://msdn.microsoft.com/en-us/library/system.data.services.changeinterceptorattribute.aspx"&gt;ChangeInterceptorAttribute&lt;/A&gt; are used to plug into the read and write operations (&lt;A class="" href="http://msdn.microsoft.com/en-us/library/system.data.services.updateoperations.aspx" mce_href="http://msdn.microsoft.com/en-us/library/system.data.services.updateoperations.aspx"&gt;UpdateOperations&lt;/A&gt; is used in the latter). You can also plug in by overriding the &lt;A class="" href="http://msdn.microsoft.com/en-us/library/cc646889.aspx" mce_href="http://msdn.microsoft.com/en-us/library/cc646889.aspx"&gt;OnStartProcessingRequest&lt;/A&gt; method, which takes a &lt;A class="" href="http://msdn.microsoft.com/en-us/library/system.data.services.processrequestargs.aspx" mce_href="http://msdn.microsoft.com/en-us/library/system.data.services.processrequestargs.aspx"&gt;ProcessRequestArgs&lt;/A&gt; argument.&lt;/P&gt;
&lt;P&gt;&lt;A class="" href="http://msdn.microsoft.com/en-us/library/system.data.services.idataserviceconfiguration.aspx" mce_href="http://msdn.microsoft.com/en-us/library/system.data.services.idataserviceconfiguration.aspx"&gt;IDataServiceConfiguration&lt;/A&gt; is used to set up configuration limits and uses &lt;A class="" href="http://msdn.microsoft.com/en-us/library/system.data.services.entitysetrights.aspx" mce_href="http://msdn.microsoft.com/en-us/library/system.data.services.entitysetrights.aspx"&gt;EntitySetRights&lt;/A&gt; and &lt;A class="" href="http://msdn.microsoft.com/en-us/library/system.data.services.serviceoperationrights.aspx" mce_href="http://msdn.microsoft.com/en-us/library/system.data.services.serviceoperationrights.aspx"&gt;ServiceOperationRights&lt;/A&gt; to figure out what operations are allowed where.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Data Support&lt;BR&gt;&lt;/EM&gt;&lt;A class="" href="http://msdn.microsoft.com/en-us/library/system.data.services.etagattribute.aspx" mce_href="http://msdn.microsoft.com/en-us/library/system.data.services.etagattribute.aspx"&gt;ETagAttribute&lt;/A&gt;, &lt;A class="" href="http://msdn.microsoft.com/en-us/library/system.data.services.ignorepropertiesattribute.aspx" mce_href="http://msdn.microsoft.com/en-us/library/system.data.services.ignorepropertiesattribute.aspx"&gt;IgnorePropertiesAttribute&lt;/A&gt; and &lt;A class="" href="http://msdn.microsoft.com/en-us/library/system.data.services.mimetypeattribute.aspx" mce_href="http://msdn.microsoft.com/en-us/library/system.data.services.mimetypeattribute.aspx"&gt;MimeTypeAttribute&lt;/A&gt; are used to annotate models when you're not using the ADO.NET Entity Framework.&lt;/P&gt;
&lt;P&gt;&lt;A class="" href="http://msdn.microsoft.com/en-us/library/system.data.services.singleresultattribute.aspx" mce_href="http://msdn.microsoft.com/en-us/library/system.data.services.singleresultattribute.aspx"&gt;SingleResultAttribute&lt;/A&gt; is used on service operations to indicate that they return a single item, and mostly affects how URLs over it are interpreted and composed.&lt;/P&gt;
&lt;P&gt;&lt;A class="" href="http://msdn.microsoft.com/en-us/library/system.data.services.iupdatable.aspx" mce_href="http://msdn.microsoft.com/en-us/library/system.data.services.iupdatable.aspx"&gt;IUpdatable&lt;/A&gt; is the interface to implement to support insert/update/delete operations when you're not using the ADO.NET Entity Framework.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Expand Support&lt;BR&gt;&lt;/EM&gt;This will be very, very rarely used - you would only have to know about any of this if you wanted to use your own implementation of the $expand query option. &lt;A class="" href="http://msdn.microsoft.com/en-us/library/system.data.services.iexpandprovider.aspx" mce_href="http://msdn.microsoft.com/en-us/library/system.data.services.iexpandprovider.aspx"&gt;IExpandProvider&lt;/A&gt; is the interface to implement, &lt;A class="" href="http://msdn.microsoft.com/en-us/library/system.data.services.expandsegmentcollection.aspx" mce_href="http://msdn.microsoft.com/en-us/library/system.data.services.expandsegmentcollection.aspx"&gt;ExpandSegmentCollection&lt;/A&gt; and &lt;A class="" href="http://msdn.microsoft.com/en-us/library/system.data.services.expandsegment.aspx" mce_href="http://msdn.microsoft.com/en-us/library/system.data.services.expandsegment.aspx"&gt;ExpandSegment&lt;/A&gt; are used to talk to it, and &lt;A class="" href="http://msdn.microsoft.com/en-us/library/system.data.services.iexpandedresult.aspx" mce_href="http://msdn.microsoft.com/en-us/library/system.data.services.iexpandedresult.aspx"&gt;IExpandedResult&lt;/A&gt; is used to return wrapped results when expansion cannot occur in-line with the object model.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Hosting the Service&lt;BR&gt;&lt;/EM&gt;&lt;A class="" href="http://msdn.microsoft.com/en-us/library/system.data.services.dataservicehost.aspx" mce_href="http://msdn.microsoft.com/en-us/library/system.data.services.dataservicehost.aspx"&gt;DataServiceHost&lt;/A&gt;, &lt;A class="" href="http://msdn.microsoft.com/en-us/library/system.data.services.dataservicehostfactory.aspx" mce_href="http://msdn.microsoft.com/en-us/library/system.data.services.dataservicehostfactory.aspx"&gt;DataServiceHostFactory&lt;/A&gt;, and &lt;A class="" href="http://msdn.microsoft.com/en-us/library/system.data.services.irequesthandler.aspx" mce_href="http://msdn.microsoft.com/en-us/library/system.data.services.irequesthandler.aspx"&gt;IRequestHandler&lt;/A&gt; are used to get the service working with Windows Communication Foundation (WCF), and usually there's nothing to be done to get it up and running - the item template for an ADO.NET Data Service has the right directive to wire everything up. &lt;A class="" href="http://msdn.microsoft.com/en-us/library/system.data.services.idataservicehost.aspx" mce_href="http://msdn.microsoft.com/en-us/library/system.data.services.idataservicehost.aspx"&gt;IDataServiceHost&lt;/A&gt; is the interface to implement if you want to host the data service without using WCF.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Error Handling&lt;BR&gt;&lt;/EM&gt;&lt;A class="" href="http://msdn.microsoft.com/en-us/library/system.data.services.dataserviceexception.aspx" mce_href="http://msdn.microsoft.com/en-us/library/system.data.services.dataserviceexception.aspx"&gt;DataServiceException&lt;/A&gt; is an exception that knows about HTTP status codes and "safe for network" messages.&lt;/P&gt;
&lt;P&gt;&lt;A class="" href="http://msdn.microsoft.com/en-us/library/system.data.services.handleexceptionargs.aspx" mce_href="http://msdn.microsoft.com/en-us/library/system.data.services.handleexceptionargs.aspx"&gt;HandleExceptionArgs&lt;/A&gt; is used as an argument in the DataService&amp;lt;T&amp;gt;&amp;nbsp;&lt;A class="" href="http://msdn.microsoft.com/en-us/library/cc646827.aspx" mce_href="http://msdn.microsoft.com/en-us/library/cc646827.aspx"&gt;HandleException&lt;/A&gt; method, and allows you to tweak an exception that was caught for processing.&lt;/P&gt;
&lt;P&gt;Well, that's it for the namespace&amp;nbsp;- as short an explanation I can give while still giving context as to the use for each type.&lt;/P&gt;
&lt;P&gt;Enjoy!&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8849773" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/marcelolr/archive/tags/Development/default.aspx">Development</category><category domain="http://blogs.msdn.com/marcelolr/archive/tags/Astoria/default.aspx">Astoria</category><category domain="http://blogs.msdn.com/marcelolr/archive/tags/ADO.NET+Data+Services/default.aspx">ADO.NET Data Services</category></item><item><title>ADO.NET Data Services RTMs!</title><link>http://blogs.msdn.com/marcelolr/archive/2008/08/11/ado-net-data-services-rtms.aspx</link><pubDate>Tue, 12 Aug 2008 00:52:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8849251</guid><dc:creator>marcelolr</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/marcelolr/comments/8849251.aspx</comments><wfw:commentRss>http://blogs.msdn.com/marcelolr/commentrss.aspx?PostID=8849251</wfw:commentRss><description>&lt;P&gt;The team blog has the announcement over at &lt;A href="http://blogs.msdn.com/astoriateam/archive/2008/08/11/rtm-is-here.aspx"&gt;http://blogs.msdn.com/astoriateam/archive/2008/08/11/rtm-is-here.aspx&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;All in all, we're very happy with this release - we hope you like it too, and it allows you to do a better and more productive job of writing software that moves data across the network.&lt;/P&gt;
&lt;P&gt;Enjoy!&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8849251" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/marcelolr/archive/tags/Astoria/default.aspx">Astoria</category><category domain="http://blogs.msdn.com/marcelolr/archive/tags/ADO.NET+Data+Services/default.aspx">ADO.NET Data Services</category></item><item><title>Service Operations in ADO.NET Data Services</title><link>http://blogs.msdn.com/marcelolr/archive/2008/01/21/service-operations-in-ado-net-data-services.aspx</link><pubDate>Tue, 22 Jan 2008 10:06:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7194502</guid><dc:creator>marcelolr</dc:creator><slash:comments>9</slash:comments><comments>http://blogs.msdn.com/marcelolr/comments/7194502.aspx</comments><wfw:commentRss>http://blogs.msdn.com/marcelolr/commentrss.aspx?PostID=7194502</wfw:commentRss><description>&lt;P&gt;One way in which you can expose additional resources from your ADO.NET Data Service is to implement "service operations" on your WebDataService subclass.&lt;/P&gt;
&lt;P&gt;For example, let's say we want to return all customers in a given city in a pre-baked entry point. We can write this code on the server:&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;public class WebDataService1 : WebDataService&amp;lt; Model.Entities &amp;gt;&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public static void InitializeService(IWebDataServiceConfiguration config)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; config.SetResourceContainerAccessRule("Customers", ResourceContainerRights.AllRead);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; config.SetServiceOperationAccessRule("CustomersInLondon", ServiceOperationRights.All);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [WebGet]&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public IQueryable&amp;lt;Model.Customers&amp;gt; CustomersInLondon()&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return from c in this.CurrentDataSource.Customers&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where c.City == "London"&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; select c;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp; &lt;BR&gt;}&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Here's what's going on:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;In &lt;EM&gt;InitializeService&lt;/EM&gt;, we make sure that the resource set we have is visible.&lt;/LI&gt;
&lt;LI&gt;Next, we make sure that the service operation we have is also visible.&lt;/LI&gt;
&lt;LI&gt;We declare a method, &lt;EM&gt;CustomersInLondon&lt;/EM&gt;, which returns an IQueryable of customers.&lt;/LI&gt;
&lt;LI&gt;We add an attribute to the method, &lt;EM&gt;WebGet&lt;/EM&gt;, which indicates we want to allow GET operations on this method.&lt;/LI&gt;
&lt;LI&gt;Finally, we return the query we're interested in. Now that there is a property &lt;EM&gt;CurrentDataSource&lt;/EM&gt;, of type &lt;EM&gt;Model.Entities&lt;/EM&gt; (the 'T' in WebDataService&amp;lt;T&amp;gt;), which we can use as the querying context.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Now we can hit F5 and run our project, and navigate to the following URL to get customers from London.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;http://localhost/WebDataService1.svc/CustomersInLondon&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Also, if we look at metadata on &lt;EM&gt;http://localhost/WebDataService1.svc/$metadata&lt;/EM&gt;, we'll see the following bit of CSDL:&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&amp;lt;FunctionImport Name="CustomersInLondon" EntitySet="Customers" ReturnType="Collection(Model.Customers)" /&amp;gt;&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Note that because we're returning an IQueryable, we can keep composing over the returned results, for example by filtering them:&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;http://localhost/WebDataService1.svc/CustomersInLondon?$filter=ContactTitle%20eq%20'Sales%20Manager'&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Or navigating through them:&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;http://localhost/WebDataService1.svc/CustomersInLondon('AROUT')/Orders&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Let's say that we didn't want to allow clients to do this - instead, we want to return a very "locked down" set of results. In that case, we simply need to change our method to return an IEnumerable result rather than an IQueryable. Note that even if the actual type is an IQueryable, as long as the result type is declared as an IEnumerable, the server won't allow composition over it.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;[WebGet]&lt;BR&gt;public IEnumerable&amp;lt;Model.Customers&amp;gt; CustomersInLondon()&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return from c in this.CurrentDataSource.Customers&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where c.City == "London"&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; select c;&lt;BR&gt;}&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;So this URL still returns results as expected: &lt;EM&gt;http://localhost/WebDataService1.svc/CustomersInLondon&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;But this fails with a message 'Query options $expand, $filter, $orderby, $skip and $top cannot be applied to the requested resource.': &lt;EM&gt;http://localhost/WebDataService1.svc/CustomersInLondon?$filter=ContactTitle%20eq%20'Sales%20Manager'&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Let's say that now want to allow the customers to tell us which specific city they're interested in, rather than hard-coding the city name.&lt;/P&gt;
&lt;P&gt;We can add the following method to our class to enable this.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;...&lt;BR&gt;public static void InitializeService(IWebDataServiceConfiguration config)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;...&lt;BR&gt;&amp;nbsp;config.SetServiceOperationAccessRule("CustomersInCity", ServiceOperationRights.All);&lt;BR&gt;}&lt;BR&gt;&amp;nbsp;&lt;BR&gt;[WebGet]&lt;BR&gt;public IQueryable&amp;lt;Model.Customers&amp;gt; CustomersInCity(string cityName)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return from c in this.CurrentDataSource.Customers&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where c.City == cityName&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; select c;&lt;BR&gt;}&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Now we can get results for this operation with the following URL: &lt;EM&gt;http://localhost/WebDataService1.svc/CustomersInCity?cityName='London'&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;As you can see, the syntax is simply the parameter name, an equals, and the value literal as you would have used in a filter or a key. The only parameter types currently supported are primitive types (numbers, string, DateTime, byte array, Guid). This is in following the the form encoding used by web browser for FORM tags.&lt;/P&gt;
&lt;P&gt;If you want to pass parameters in the request body rather than the query portion of the URL, you can use &lt;EM&gt;WebInvoke&lt;/EM&gt; on the service operation method instead of &lt;EM&gt;WebGet&lt;/EM&gt;. The clients then use POST rather than GET, and pass the queries in the body of the request, using application/x-www-form-urlencoded encoding.&lt;/P&gt;
&lt;P&gt;There are two more attributes that are interesting for service operations. You can use the &lt;EM&gt;Microsoft.Data.Web.SingleResultAttribute&lt;/EM&gt; attribute to indicate a single result will be returned from a specific operation.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;...&lt;BR&gt;public static void InitializeService(IWebDataServiceConfiguration config)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;...&lt;BR&gt;&amp;nbsp;config.SetServiceOperationAccessRule("LastOrderDate", ServiceOperationRights.All);&lt;BR&gt;}&lt;BR&gt;&amp;nbsp;&lt;BR&gt;[SingleResult]&lt;BR&gt;[WebGet]&lt;BR&gt;public IQueryable&amp;lt;DateTime&amp;gt; LastOrderDate()&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var result =&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from o in this.CurrentDataSource.Orders&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; orderby o.OrderDate&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; select o;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return result.Take(1).Select((o) =&amp;gt; o.OrderDate.Value);&lt;BR&gt;}&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;You can now access this value from the following URL: &lt;EM&gt;http://localhost/WebDataService1.svc/LastOrderDate&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;And finally, the &lt;EM&gt;MimeTypeAttribute&lt;/EM&gt; can be returned to indicate that a given MIME type applies to the returned value of an operation.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;...&lt;BR&gt;public static void InitializeService(IWebDataServiceConfiguration config)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;...&lt;BR&gt;&amp;nbsp;config.SetServiceOperationAccessRule("WelcomePage", ServiceOperationRights.All);&lt;BR&gt;}&lt;BR&gt;&amp;nbsp;&lt;BR&gt;[MimeType("text/html")]&lt;BR&gt;[SingleResult]&lt;BR&gt;[WebGet]&lt;BR&gt;public IQueryable&amp;lt;string&amp;gt; WelcomePage()&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return new string[]&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;&amp;lt;title&amp;gt;Welcome&amp;lt;/title&amp;gt;&amp;lt;/head&amp;gt;" +&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "&amp;lt;body&amp;gt;&amp;lt;h1&amp;gt;Welcome!&amp;lt;/h1&amp;gt;&amp;lt;p&amp;gt;Currently we have " +&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.CurrentDataSource.Customers.Count().ToString() + &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; " customers.&amp;lt;/p&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;"&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }.AsQueryable();&lt;BR&gt;}&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;You can now access this information through the following URL: &lt;EM&gt;http://localhost/WebDataService1.svc/WelcomePage/$value&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Now, there are far better methods for generating web pages, but I just wanted to give a little taste of how having a (simple!) uniform interface for accessing resources allows you to integrate disparate systems, like a web browser and an ADO.NET Data Service.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This post is part of the transparent design exercise in the Astoria Team. To understand how it works and how your feedback will be used please look at &lt;A class="" href="http://blogs.msdn.com/astoriateam/archive/2007/07/20/transparency-in-the-design-process.aspx" mce_href="http://blogs.msdn.com/astoriateam/archive/2007/07/20/transparency-in-the-design-process.aspx"&gt;this post&lt;/A&gt;.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7194502" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/marcelolr/archive/tags/Astoria/default.aspx">Astoria</category><category domain="http://blogs.msdn.com/marcelolr/archive/tags/ADO.NET+Data+Services/default.aspx">ADO.NET Data Services</category></item><item><title>Arithmetic and built-in functions for $filter</title><link>http://blogs.msdn.com/marcelolr/archive/2008/01/15/arithmetic-and-built-in-functions-for-filter.aspx</link><pubDate>Wed, 16 Jan 2008 04:03:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7123471</guid><dc:creator>marcelolr</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/marcelolr/comments/7123471.aspx</comments><wfw:commentRss>http://blogs.msdn.com/marcelolr/commentrss.aspx?PostID=7123471</wfw:commentRss><description>&lt;P&gt;While the syntax described for filter in the &lt;A class="" href="http://blogs.msdn.com/marcelolr/archive/2008/01/10/filter-query-option-in-ado-net-data-services.aspx" mce_href="http://blogs.msdn.com/marcelolr/archive/2008/01/10/filter-query-option-in-ado-net-data-services.aspx"&gt;previous post&lt;/A&gt; allows you to do some nifty things, there are still a few more things that an ADO.NET Data Service supports.&lt;/P&gt;
&lt;P&gt;The first are operators for arithmetic: +, -, *, /, %. These also have mnemonics:&lt;/P&gt;
&lt;TABLE class="" border=1&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class=""&gt;+&lt;/TD&gt;
&lt;TD class=""&gt;add&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;-&lt;/TD&gt;
&lt;TD class=""&gt;sub&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;/&lt;/TD&gt;
&lt;TD class=""&gt;div&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;*&lt;/TD&gt;
&lt;TD class=""&gt;mul&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;%&lt;/TD&gt;
&lt;TD class=""&gt;mod&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;P&gt;So the following is a very elaborate but silly filter:&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;/Region?$filter=(1 add 1 eq 2) and (1 sub 1 eq 0) and (1 mul 1 eq 1) and (1 div 1 eq 1) and (1 mod 1 eq 0)&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;There are also a number of built-in functions that you can use. These are fairly simple and are likely to be implemented in some way by the data provider for your data service. These functions must be recognized by the provider for the &lt;A class="" href="http://blogs.msdn.com/astoriateam/archive/2007/09/27/astoria-data-sources-and-system-layering.aspx" mce_href="http://blogs.msdn.com/astoriateam/archive/2007/09/27/astoria-data-sources-and-system-layering.aspx"&gt;data source&lt;/A&gt; to be usable; the provider for Linq to Objects and Linq to Entities already recognize them and in the latter case, the Entity Framework is able to have them execute directly on the database server, for best efficiency.&lt;/P&gt;
&lt;P&gt;The functions are the following. I'll give an obvious example of each that always evaluates to true, just to show how they can be used. Remember you can always use properties or more complex expressions in place of constants.&lt;/P&gt;
&lt;P&gt;&lt;U&gt;String Functions&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;contains&lt;/STRONG&gt; - checks whether a string is contained in another one&lt;BR&gt;&lt;EM&gt;/Region?$filter=contains('abc', 'ab')&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;endswith&lt;/STRONG&gt; - checks whether a string ends with another one&lt;BR&gt;&lt;EM&gt;/Region?$filter=contains('abc', 'bc')&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;startswith&lt;/STRONG&gt; - checks whether a string starts with another one&lt;BR&gt;&lt;EM&gt;/Region?$filter=contains('abc', 'b')&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;indexof&lt;/STRONG&gt; - gets the index of a substring (zero-based)&lt;BR&gt;&lt;EM&gt;/Region?$filter=2 eq indexof('abc', 'c')&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;insert&lt;/STRONG&gt; - inserts a string inside another one&lt;BR&gt;&lt;EM&gt;/Region?$filter='abcd' eq insert('ad', 1, 'bc')&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;tolower&lt;/STRONG&gt; - converts a string to lowercase&lt;BR&gt;&lt;EM&gt;/Region?$filter='abc' eq tolower('ABC')&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;toupper&lt;/STRONG&gt; - converts a string to uppercase&lt;BR&gt;&lt;EM&gt;/Region?$filter='ABC' eq toupper('abc')&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;trim&lt;/STRONG&gt; - trims leading and trailing whitespace from a string&lt;BR&gt;&lt;EM&gt;/Region?$filter='abc' eq trim(' abc ')&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;remove&lt;/STRONG&gt; - removes characters from a string from a given offset (length optional)&lt;BR&gt;&lt;EM&gt;/Region?$filter='abc' eq remove('a00bc', 1, 2)&lt;BR&gt;/Region?$filter='a' eq remove('a00bc', 1)&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;substring&lt;/STRONG&gt; - gets characters from a string from a given offset (length optional)&lt;BR&gt;&lt;EM&gt;/Region?$filter='00' eq substring('a00bc', 1, 2)&lt;BR&gt;/Region?$filter='00bc' eq substring('a00bc', 1)&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;concat&lt;/STRONG&gt; - concatenates two strings&lt;BR&gt;&lt;EM&gt;/Region?$filter='abc' eq concat('ab', 'c')&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;length&lt;/STRONG&gt; - gets the length of a string&lt;BR&gt;&lt;EM&gt;/Region?$filter=3 eq length('abc')&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;DateTime Functions&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;year&lt;/STRONG&gt; - gets the year of a DateTime value&lt;BR&gt;&lt;EM&gt;/Region?$filter=1990 eq year('1990-12-20')&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;month&lt;/STRONG&gt; - gets the month of a DateTime value&lt;BR&gt;&lt;EM&gt;/Region?$filter=12 eq month('1990-12-20')&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;day&lt;/STRONG&gt; - gets the day of the month of a DateTime value&lt;BR&gt;&lt;EM&gt;/Region?$filter=20 eq day('1990-12-20')&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;hour&lt;/STRONG&gt; - gets the hour of the day of a DateTime value&lt;BR&gt;&lt;EM&gt;/Region?$filter=14 eq hour('1990-12-20T14:10:20')&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;minute&lt;/STRONG&gt; - gets the minute of the hour of a DateTime value&lt;BR&gt;&lt;EM&gt;/Region?$filter=10 eq minute('1990-12-20T14:10:20')&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;second&lt;/STRONG&gt; - gets the second of the minute of a DateTime value&lt;BR&gt;&lt;EM&gt;/Region?$filter=20 eq second('1990-12-20T14:10:20')&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;Math Functions&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;round&lt;/STRONG&gt; - rounds a value to its nearest integral value&lt;BR&gt;&lt;EM&gt;Region?$filter=2 eq round(1.8)&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;floor&lt;/STRONG&gt; - gets the largest integral value (in magnitude) that is less than or equal a given value&lt;BR&gt;&lt;EM&gt;/Region?$filter=1 eq floor(1.8)&lt;BR&gt;/Region?$filter=-2 eq floor(-1.8)&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;ceiling&lt;/STRONG&gt; - gets the smallest integral value (in magnitude) that is greater than or equal a given value&lt;BR&gt;&lt;EM&gt;/Region?$filter=2 eq ceiling(1.8)&lt;BR&gt;/Region?$filter=-1 eq ceiling(-1.8)&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;Type Functions&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;isof&lt;/STRONG&gt; - checks whether something is of the given type - useful in inheritance scenarios&lt;BR&gt;&lt;EM&gt;/Region?$filter=isof('Model.Region') -&amp;gt; in the ATOM payload, I see 'Model.Region as the adsm:type - this depends on the namespace for your types)&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;cast&lt;/STRONG&gt; - casts something to a given type - useful in inheritance scenarios&lt;BR&gt;&lt;EM&gt;/Region?$filter=(cast('Model.Region'))/RegionID ge 0&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Whew! Well, that's it for functions. Put them to good use!&lt;/P&gt;
&lt;P&gt;This post is part of the transparent design exercise in the Astoria Team. To understand how it works and how your feedback will be used please look at &lt;A class="" href="http://blogs.msdn.com/astoriateam/archive/2007/07/20/transparency-in-the-design-process.aspx" mce_href="http://blogs.msdn.com/astoriateam/archive/2007/07/20/transparency-in-the-design-process.aspx"&gt;this post&lt;/A&gt;.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7123471" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/marcelolr/archive/tags/Astoria/default.aspx">Astoria</category><category domain="http://blogs.msdn.com/marcelolr/archive/tags/ADO.NET+Data+Services/default.aspx">ADO.NET Data Services</category></item><item><title>Shaping the ADO.NET Data Services Silverlight Add-On</title><link>http://blogs.msdn.com/marcelolr/archive/2008/01/12/shaping-the-ado-net-data-services-silverlight-add-on.aspx</link><pubDate>Sat, 12 Jan 2008 12:01:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7087051</guid><dc:creator>marcelolr</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/marcelolr/comments/7087051.aspx</comments><wfw:commentRss>http://blogs.msdn.com/marcelolr/commentrss.aspx?PostID=7087051</wfw:commentRss><description>&lt;P&gt;So, as per the announcement on this &lt;A class="" href="http://blogs.msdn.com/astoriateam/archive/2008/01/11/ado-net-data-services-silverlight-add-on.aspx" mce_href="http://blogs.msdn.com/astoriateam/archive/2008/01/11/ado-net-data-services-silverlight-add-on.aspx"&gt;team blog post&lt;/A&gt;, there is now a library you can use from a Silverlight 1.1 Alpha project to access your data.&lt;/P&gt;
&lt;P&gt;This is a great time to let us know what you think, in the post comments or in the forums. Is is too hard to use? Does it over-simply something that's important to you? Were you expecting something completely different?&lt;/P&gt;
&lt;P&gt;There are more things that we'd like to do for this library, and you get to help us define the shape it will take. Speak up!&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This post is part of the transparent design exercise in the Astoria Team. To understand how it works and how your feedback will be used please look at &lt;A class="" href="http://blogs.msdn.com/astoriateam/archive/2007/07/20/transparency-in-the-design-process.aspx" mce_href="http://blogs.msdn.com/astoriateam/archive/2007/07/20/transparency-in-the-design-process.aspx"&gt;this post&lt;/A&gt;.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7087051" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/marcelolr/archive/tags/Astoria/default.aspx">Astoria</category><category domain="http://blogs.msdn.com/marcelolr/archive/tags/ADO.NET+Data+Services/default.aspx">ADO.NET Data Services</category></item><item><title>$filter Query Option in ADO.NET Data Services</title><link>http://blogs.msdn.com/marcelolr/archive/2008/01/10/filter-query-option-in-ado-net-data-services.aspx</link><pubDate>Fri, 11 Jan 2008 08:24:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7067912</guid><dc:creator>marcelolr</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/marcelolr/comments/7067912.aspx</comments><wfw:commentRss>http://blogs.msdn.com/marcelolr/commentrss.aspx?PostID=7067912</wfw:commentRss><description>&lt;P&gt;Let's say that we have a data service exposing all of Northwind. We can get all customers in the database by accessing this URL.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;A href="http://localhost/WebDataService1.svc/Customers"&gt;http://localhost/WebDataService1.svc/Customers&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;That could be more data than we wanted. Let's say we only care about customers in London. We can use the $filter query option to get all customers that match this condition by accessing this URL.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;/Customers?$filter=City eq 'London'&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;(I’m shortening and unescaping such URLs for readability; we actually follow standard URI conventions and the URI you’ll see will be something like &lt;EM&gt;http://localhost/WebDataService1.svc/Customers?$filter=City%20eq%20'London')&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;What can go in a $filter? The most basic thing to do is to test properties of the resources we're returning, which you can access simply by name, like we have done above. Literals for things like strings and numbers use the same syntax as in the key portion (see my &lt;A class="" href="http://blogs.msdn.com/marcelolr/archive/2008/01/08/updates-to-url-syntax-for-december-ctp-of-ado-net-data-services.aspx" mce_href="http://blogs.msdn.com/marcelolr/archive/2008/01/08/updates-to-url-syntax-for-december-ctp-of-ado-net-data-services.aspx"&gt;last post&lt;/A&gt; and the &lt;A class="" href="http://blogs.msdn.com/astoriateam/archive/2007/09/21/uri-format-part-1-addressing-resources-using-uri-path-segments.aspx" mce_href="http://blogs.msdn.com/astoriateam/archive/2007/09/21/uri-format-part-1-addressing-resources-using-uri-path-segments.aspx"&gt;original URL post&lt;/A&gt; for more details).&lt;/P&gt;
&lt;P&gt;To actually test for a condition, you can use comparison operators, which look a lot like the symbolic ones you'd expect in C# but use short mnemonics to make them easier to write and not have to deal with escaping/unescaping in the URL.&lt;/P&gt;
&lt;TABLE class="" border=1&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class=""&gt;eq&lt;/TD&gt;
&lt;TD class=""&gt;equals&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;ne&lt;/TD&gt;
&lt;TD class=""&gt;not equals&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;lt&lt;/TD&gt;
&lt;TD class=""&gt;less than&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;le&lt;/TD&gt;
&lt;TD class=""&gt;less than or equal&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;gt&lt;/TD&gt;
&lt;TD class=""&gt;greater than&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class=""&gt;ge&lt;/TD&gt;
&lt;TD class=""&gt;greater than or equal&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;P&gt;So all of these are valid URLs:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;EM&gt;/Orders?$filter=OrderDate lt '1996-08-01'&lt;/EM&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;EM&gt;/Orders?$filter=Customers/CustomerID eq 'ALFKI'&lt;/EM&gt; -&amp;gt; Note that you can traverse navigation properties that reference a single resource. The "Customers" plural is an artifact of the default mapping generated, the property is really a to-one navigation property.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;To include more than one condition, you can use 'and', 'or' and of course 'not'.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;EM&gt;/Orders?$filter=Customers/CustomerID eq 'ALFKI' or Customers/CustomerID eq 'WOLZA'&lt;/EM&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;EM&gt;/Orders?$filter=ShipCountry eq 'France' and ShipCity eq 'Toulouse'&lt;/EM&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;To group conditions logically, you can use parenthesis.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;EM&gt;/Orders?$filter=ShipCountry eq 'France' and (ShipCity eq 'Toulouse' or ShipCity eq 'Marseille')&lt;/EM&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Today we don’t support operations on collections, which has two practical points.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;First, we don’t lift values from collections, so you can’t have a filter such as &lt;EM&gt;/Customers?$filter=Orders/Name eq 'Foo'&lt;/EM&gt; (this would imply a quantifier such as ‘any’ or ‘all’).&lt;/LI&gt;
&lt;LI&gt;Second, we don’t have aggregates, so you can’t write a query such as &lt;EM&gt;/Customers?$filter=count(Orders) gt 5&lt;/EM&gt;. This restriction helps to set bounds to any single operation and simplifies the queries that the server and clients need to deal with.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Next time, more on what you can put in a $filter.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This post is part of the transparent design exercise in the Astoria Team. To understand how it works and how your feedback will be used please look at &lt;A class="" href="http://blogs.msdn.com/astoriateam/archive/2007/07/20/transparency-in-the-design-process.aspx" mce_href="http://blogs.msdn.com/astoriateam/archive/2007/07/20/transparency-in-the-design-process.aspx"&gt;this post&lt;/A&gt;.&lt;BR&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7067912" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/marcelolr/archive/tags/Astoria/default.aspx">Astoria</category><category domain="http://blogs.msdn.com/marcelolr/archive/tags/ADO.NET+Data+Services/default.aspx">ADO.NET Data Services</category></item><item><title>Updates to URL syntax for December CTP of ADO.NET Data Services</title><link>http://blogs.msdn.com/marcelolr/archive/2008/01/08/updates-to-url-syntax-for-december-ctp-of-ado-net-data-services.aspx</link><pubDate>Wed, 09 Jan 2008 06:43:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7035972</guid><dc:creator>marcelolr</dc:creator><slash:comments>8</slash:comments><comments>http://blogs.msdn.com/marcelolr/comments/7035972.aspx</comments><wfw:commentRss>http://blogs.msdn.com/marcelolr/commentrss.aspx?PostID=7035972</wfw:commentRss><description>&lt;P&gt;This post talks a bit about updates from the &lt;A class="" href="http://blogs.msdn.com/astoriateam/archive/2007/09/21/uri-format-part-1-addressing-resources-using-uri-path-segments.aspx" mce_href="http://blogs.msdn.com/astoriateam/archive/2007/09/21/uri-format-part-1-addressing-resources-using-uri-path-segments.aspx"&gt;last post on the URI format&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;In that post, we discussed how we were considering having a "full form" and a "compressed form" for syntax. With the convergence of using ATOM and JSON as the serialization formats, we’ve been able to converge on the URI format as well and thus we no longer have both forms&amp;nbsp;- we simply have the resource set name and a comma-separated list of key values in parents: &lt;FONT face="Lucida Console"&gt;/Customers('ALFKI')&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;The use of parens for values is a classic CSV-style design: a character to separate (&lt;FONT face="Lucida Console"&gt;,&lt;/FONT&gt;); a character to delimit the values so you can include the separator in them (&lt;FONT face="Lucida Console"&gt;'Lopez Ruiz, Marcelo','another string'&lt;/FONT&gt;), and a convention to double the delimiter to use it (&lt;FONT face="Lucida Console"&gt;'Marcelo''s World','Party time! Excellent!'&lt;/FONT&gt;).&lt;/P&gt;
&lt;P&gt;There are other types that don't really require delimiters, like dates, but because they come in handy when used in expressions on the query side of the string (after the '&lt;FONT face="Lucida Console"&gt;?&lt;/FONT&gt;'), we've kept them in the key portion as well. This way client libraries only need to deal with a single format. If this doesn't make much sense, wait a bit and I'll go into it in a post in the near future.&lt;/P&gt;
&lt;P&gt;Everything else works pretty much as described in the post - feel free to post here or in the &lt;A class="" href="http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=1430&amp;amp;SiteID=1" mce_href="http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=1430&amp;amp;SiteID=1"&gt;forums&lt;/A&gt; if you have any questions or want to provide feedback on this.&lt;/P&gt;
&lt;P&gt;This post is part of the transparent design exercise in the Astoria Team. To understand how it works and how your feedback will be used please look at &lt;A class="" href="http://blogs.msdn.com/astoriateam/archive/2007/07/20/transparency-in-the-design-process.aspx" mce_href="http://blogs.msdn.com/astoriateam/archive/2007/07/20/transparency-in-the-design-process.aspx"&gt;this post&lt;/A&gt;.&lt;BR&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7035972" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/marcelolr/archive/tags/Astoria/default.aspx">Astoria</category><category domain="http://blogs.msdn.com/marcelolr/archive/tags/ADO.NET+Data+Services/default.aspx">ADO.NET Data Services</category></item><item><title>Fast, simple test app for ADO.NET Data Services</title><link>http://blogs.msdn.com/marcelolr/archive/2008/01/02/fast-simple-test-app-for-ado-net-data-services.aspx</link><pubDate>Thu, 03 Jan 2008 02:02:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6960609</guid><dc:creator>marcelolr</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/marcelolr/comments/6960609.aspx</comments><wfw:commentRss>http://blogs.msdn.com/marcelolr/commentrss.aspx?PostID=6960609</wfw:commentRss><description>&lt;P&gt;If you're currently looking at the ADO.NET Data Services functionality that is available through the &lt;A class="" href="http://go.microsoft.com/fwlink/?LinkID=105029" mce_href="http://go.microsoft.com/fwlink/?LinkID=105029"&gt;ASP.NET 3.5 Extensions Preview&lt;/A&gt; download, you'll notice that using the project item to add a new service is fabulously simple.&lt;/P&gt;
&lt;P&gt;If you're not doing anything serious and just want to play around with server models and look at the wire formats, however, it is very simple to create a quick app. There is very little to add over &lt;A class="" href="http://blogs.msdn.com/marcelolr/archive/2007/12/31/getting-ado-net-data-service-error-details-on-client.aspx" mce_href="http://blogs.msdn.com/marcelolr/archive/2007/12/31/getting-ado-net-data-service-error-details-on-client.aspx"&gt;my last post&lt;/A&gt; in terms of setting things up - the only extra bit I've added here is a simple class that returns some sample data (using some very nice &lt;A class="" href="http://msdn2.microsoft.com/en-us/library/ms364047(vs.80).aspx#cs3spec_topic5" mce_href="http://msdn2.microsoft.com/en-us/library/ms364047(vs.80).aspx#cs3spec_topic5"&gt;object and collection initializers&lt;/A&gt;). Getting the service going is also very simple - Christian Weyer &lt;A class="" href="http://blogs.thinktecture.com/cweyer/archive/2007/12/11/415057.aspx" mce_href="http://blogs.thinktecture.com/cweyer/archive/2007/12/11/415057.aspx"&gt;goes into more detail&lt;/A&gt; as to how this all works together, and&amp;nbsp;&lt;A class="" href="http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2007/12/19/10028.aspx" mce_href="http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2007/12/19/10028.aspx"&gt;Mike Taulty&lt;/A&gt; already found this as well.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;using System;&lt;BR&gt;using System.Collections.Generic;&lt;BR&gt;using System.Diagnostics;&lt;BR&gt;using System.Linq;&lt;BR&gt;using Microsoft.Data.Web;&lt;BR&gt;&lt;BR&gt;namespace ConsoleApplication2&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public class Customer&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public int ID { get; set; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public string Name { get; set; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public class SampleContext&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public IQueryable&amp;lt;Customer&amp;gt; Customers&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; get&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return new List&amp;lt;Customer&amp;gt;()&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; new Customer() { ID = 1, Name = "Marcelo" },&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; new Customer() { ID = 2, Name = "Andy" },&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }.AsQueryable();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public class SampleService : WebDataService&amp;lt;SampleContext&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public static void InitializeService(IWebDataServiceConfiguration c)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c.SetResourceContainerAccessRule("*", ResourceContainerRights.All);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; class Program&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; static void Main(string[] args)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string location = "&lt;/EM&gt;&lt;EM&gt;http://localhost:20000/&lt;/EM&gt;&lt;EM&gt;";&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DataServiceHost host = new DataServiceHost(&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; typeof(SampleService), &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; new Uri[] { new Uri(location) });&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; host.Open();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Process p = Process.Start(location);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (p != null) p.Dispose();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.WriteLine("Press any key to shut down the service at " + location);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Console.ReadKey();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; host.Close();&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;}&lt;/EM&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at &lt;A href="http://www.microsoft.com/info/cpyright.htm"&gt;http://www.microsoft.com/info/cpyright.htm&lt;/A&gt;.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=6960609" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/marcelolr/archive/tags/Astoria/default.aspx">Astoria</category><category domain="http://blogs.msdn.com/marcelolr/archive/tags/ADO.NET+Data+Services/default.aspx">ADO.NET Data Services</category></item></channel></rss>