<?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>ADO.NET Data Services Team Blog : ADO.NET Data Services</title><link>http://blogs.msdn.com/astoriateam/archive/tags/ADO.NET+Data+Services/default.aspx</link><description>Tags: ADO.NET Data Services</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Introducing the Microsoft Open Data Protocol Visualizer (CTP1)</title><link>http://blogs.msdn.com/astoriateam/archive/2009/11/17/introducing-the-microsoft-open-data-protocol-visualizer.aspx</link><pubDate>Tue, 17 Nov 2009 19:36:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9923781</guid><dc:creator>dpblogs</dc:creator><slash:comments>20</slash:comments><comments>http://blogs.msdn.com/astoriateam/comments/9923781.aspx</comments><wfw:commentRss>http://blogs.msdn.com/astoriateam/commentrss.aspx?PostID=9923781</wfw:commentRss><description>&lt;H3&gt;1. Introduction&lt;/H3&gt;
&lt;P&gt;The Open Data Protocol Visualizer for Visual Studio&amp;nbsp;CTP1&amp;nbsp;(“the visualizer”) is a extension that provides a read-only visualization of the types, properties, associations, and other objects in the &lt;A href="http://msdn.microsoft.com/en-us/library/bb387122.aspx" mce_href="http://msdn.microsoft.com/en-us/library/bb387122.aspx"&gt;Entity Data Model (EDM)&lt;/A&gt; returned from an &lt;A href="http://msdn.microsoft.com/en-us/library/cc716656.aspx" mce_href="http://msdn.microsoft.com/en-us/library/cc716656.aspx"&gt;Open Data Protocol’s metadata endpoint&lt;/A&gt; (this document assumes basic familiarity with the EDM).&lt;/P&gt;
&lt;P&gt;For instructions on how to create a data service, &lt;A href="http://msdn.microsoft.com/en-us/library/cc907912.aspx" mce_href="http://msdn.microsoft.com/en-us/library/cc907912.aspx"&gt;see here&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;This blog post uses a slightly modified version of a model reverse-engineered from part of the &lt;A href="http://www.microsoft.com/downloads/details.aspx?FamilyID=06616212-0356-46A0-8DA2-EEBC53A68034&amp;amp;displaylang=en" mce_href="http://www.microsoft.com/downloads/details.aspx?FamilyID=06616212-0356-46A0-8DA2-EEBC53A68034&amp;amp;displaylang=en"&gt;Northwind database&lt;/A&gt;. For general purposes, the &lt;A href="http://www.codeplex.com/MSFTDBProdSamples" mce_href="http://www.codeplex.com/MSFTDBProdSamples"&gt;AdventureWorks sample database&lt;/A&gt;, or any other database you choose, will work as well.&lt;/P&gt;
&lt;H3&gt;2. Walkthrough&lt;/H3&gt;
&lt;P&gt;The modifications made to the Northwind model were done in order to demonstrate additional features of the visualizer. Specifically:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;1.&lt;/STRONG&gt; The address fields in various types in the model have been replaced by the usage of a &lt;A href="http://msdn.microsoft.com/en-us/library/bb738466.aspx" mce_href="http://msdn.microsoft.com/en-us/library/bb738466.aspx"&gt;Complex Type&lt;/A&gt; called “Address”. &lt;BR&gt;&lt;STRONG&gt;2.&lt;/STRONG&gt; A subtype of Product called “DiscontinuedProduct” has been added. &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;a.&lt;/STRONG&gt; The “Discontinued” property has been removed from Product. &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;b.&lt;/STRONG&gt; Product is mapped to the Products table with condition Discontinued=false &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;c.&lt;/STRONG&gt; DiscontinuedProduct is mapped to the Products table with condition Discontinued=true &lt;BR&gt;&lt;STRONG&gt;3.&lt;/STRONG&gt; Two &lt;A href="http://msdn.microsoft.com/en-us/library/cc716710.aspx" mce_href="http://msdn.microsoft.com/en-us/library/cc716710.aspx"&gt;function imports&lt;/A&gt; have been added to the model for the “Employee_Sales_by_Country” and “Sales_by_Year” stored procedures. &lt;BR&gt;&lt;STRONG&gt;4.&lt;/STRONG&gt; For each stored procedure, a complex type has been created to hold its results, and a method added to the data context to enable it.&lt;/P&gt;
&lt;P&gt;The XML for this model is available for download &lt;A href="http://blogs.msdn.com/astoriateam/attachment/9923781.ashx" mce_href="http://blogs.msdn.com/astoriateam/attachment/9923781.ashx"&gt;&lt;STRONG&gt;here&lt;/STRONG&gt;&lt;/A&gt;.&lt;/P&gt;
&lt;H4&gt;2.1 Install&lt;/H4&gt;
&lt;P&gt;Launch the “Extension Manager” from the Visual Studio “Tools” menu. The visualizer is available from the online gallery, and you can find it quickly by entering “Open Data Protocol” into the search field:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/IntroducingtheMicrosoftOpenDataProtocolV_A319/image_2.png" mce_href="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/IntroducingtheMicrosoftOpenDataProtocolV_A319/image_2.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/IntroducingtheMicrosoftOpenDataProtocolV_A319/image_thumb.png" width=632 height=72 mce_src="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/IntroducingtheMicrosoftOpenDataProtocolV_A319/image_thumb.png"&gt;&lt;/A&gt; &lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;The visualizer is available for download from the Visual Studio Gallery here:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://visualstudiogallery.msdn.microsoft.com/en-us/f4ac856a-796e-4d78-9a3d-0120d8137722" mce_href="http://visualstudiogallery.msdn.microsoft.com/en-us/f4ac856a-796e-4d78-9a3d-0120d8137722"&gt;http://visualstudiogallery.msdn.microsoft.com/en-us/f4ac856a-796e-4d78-9a3d-0120d8137722&lt;/A&gt;&lt;/P&gt;
&lt;H4&gt;2.2 Setup&lt;/H4&gt;
&lt;P&gt;To get up and running:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;1.&lt;/STRONG&gt; Create a solution containing a web application project and a console application.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;2.&lt;/STRONG&gt; Add a new, blank ADO.NET Entity Data Model to the web application.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;3.&lt;/STRONG&gt; Close the model.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;4.&lt;/STRONG&gt; Right-click the model file, select “Open With” and in the list, select “XML Editor”.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;5.&lt;/STRONG&gt; Paste the contents of the &lt;A href="http://blogs.msdn.com/astoriateam/attachment/9923781.ashx" mce_href="http://blogs.msdn.com/astoriateam/attachment/9923781.ashx"&gt;Modified Northwind Model&lt;/A&gt; into it.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;6.&lt;/STRONG&gt; Save and close the model file.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;7.&lt;/STRONG&gt; If you do not have it already set up, add the Northwind.MDF database to the web application’s App_Data folder. &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;8.&lt;/STRONG&gt; Double-click the model file to open it with the designer.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;9.&lt;/STRONG&gt; Right click on the designer surface and select “Update Model from Database”.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;10.&lt;/STRONG&gt; Select the connection to Northwind.MDF, which will be automatically created for you when the MDF file is added to App_Data. If you are using your own database, you may need to create a new connection to it.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;11.&lt;/STRONG&gt; Proceed through the update wizard, accepting all the defaults, adding no new objects. This process will set up the database connection for you in web.config. It should look like this:&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: #a31515; FONT-SIZE: 9.5pt"&gt;add&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: red; FONT-SIZE: 9.5pt"&gt;name&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;"&lt;SPAN style="COLOR: blue"&gt;NORTHWNDEntities&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;connectionString&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=System.Data.SqlClient;provider connection string=&lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;&amp;amp;quot;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\NORTHWND.MDF;Integrated Security=True;User Instance=True;MultipleActiveResultSets=True&lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;&amp;amp;quot;&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;providerName&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;System.Data.EntityClient&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; /&amp;gt; &lt;/P&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;P&gt;&lt;STRONG&gt;12.&lt;/STRONG&gt; Add a new WCF Data Service (in Beta2 this will show up as ADO.NET Data Service) and configure it as shown below. Note the additional web methods and the exposure of all entity sets and all service operations using the “*” string. This lack of security means that this is not a data service that you would want to expose publicly.&lt;/P&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;using&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt; System; &lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;using&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt; System.Collections.Generic; &lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;using&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt; System.Data.Objects; &lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;using&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt; System.Data.Services; &lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;using&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt; System.Data.Services.Common; &lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;using&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt; System.Linq; &lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;using&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt; System.ServiceModel.Web; &lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;using&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt; System.Web;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt; &lt;/P&gt;&lt;/SPAN&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: consolas; COLOR: blue; FONT-SIZE: 9.5pt"&gt;namespace&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt; NorthwindServices &lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;{ &lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;public&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;class&lt;/SPAN&gt; &lt;SPAN style="COLOR: #2b91af"&gt;NorthwindService&lt;/SPAN&gt; : &lt;SPAN style="COLOR: #2b91af"&gt;DataService&lt;/SPAN&gt;&amp;lt;&lt;SPAN style="COLOR: #2b91af"&gt;NORTHWNDEntities&lt;/SPAN&gt;&amp;gt; &lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{ &lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;// This method is called only once to initialize service-wide policies. &lt;BR&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;public&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;static&lt;/SPAN&gt; &lt;SPAN style="COLOR: blue"&gt;void&lt;/SPAN&gt; InitializeService(&lt;SPAN style="COLOR: #2b91af"&gt;DataServiceConfiguration&lt;/SPAN&gt; config) &lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{ &lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;config.SetEntitySetAccessRule(&lt;SPAN style="COLOR: #a31515"&gt;"*"&lt;/SPAN&gt;, &lt;SPAN style="COLOR: #2b91af"&gt;EntitySetRights&lt;/SPAN&gt;.AllRead); &lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;config.SetServiceOperationAccessRule(&lt;SPAN style="COLOR: #a31515"&gt;"*"&lt;/SPAN&gt;, &lt;SPAN style="COLOR: #2b91af"&gt;ServiceOperationRights&lt;/SPAN&gt;.All); &lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;config.DataServiceBehavior.MaxProtocolVersion = &lt;SPAN style="COLOR: #2b91af"&gt;DataServiceProtocolVersion&lt;/SPAN&gt;.V2; &lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;} &lt;/P&gt;&lt;/SPAN&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;[&lt;SPAN style="COLOR: #2b91af"&gt;WebGet&lt;/SPAN&gt;] &lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;public&lt;/SPAN&gt; &lt;SPAN style="COLOR: #2b91af"&gt;ObjectResult&lt;/SPAN&gt;&amp;lt;&lt;SPAN style="COLOR: #2b91af"&gt;Employee_Sales_by_Country_Result&lt;/SPAN&gt;&amp;gt; GetEmployeeSalesByCountry(&lt;SPAN style="COLOR: #2b91af"&gt;DateTime&lt;/SPAN&gt; start, &lt;SPAN style="COLOR: #2b91af"&gt;DateTime&lt;/SPAN&gt; end) &lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{ &lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;NORTHWNDEntities&lt;/SPAN&gt; entities = &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; &lt;SPAN style="COLOR: #2b91af"&gt;NORTHWNDEntities&lt;/SPAN&gt;(); &lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;return&lt;/SPAN&gt; entities.Employee_Sales_by_Country(start, end); &lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;} &lt;/P&gt;&lt;/SPAN&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;[&lt;SPAN style="COLOR: #2b91af"&gt;WebGet&lt;/SPAN&gt;] &lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;public&lt;/SPAN&gt; &lt;SPAN style="COLOR: #2b91af"&gt;ObjectResult&lt;/SPAN&gt;&amp;lt;&lt;SPAN style="COLOR: #2b91af"&gt;Sales_by_Year_Result&lt;/SPAN&gt;&amp;gt; GetSalesByYear(&lt;SPAN style="COLOR: #2b91af"&gt;DateTime&lt;/SPAN&gt; start, &lt;SPAN style="COLOR: #2b91af"&gt;DateTime&lt;/SPAN&gt; end) &lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{ &lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;NORTHWNDEntities&lt;/SPAN&gt; entities = &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; &lt;SPAN style="COLOR: #2b91af"&gt;NORTHWNDEntities&lt;/SPAN&gt;(); &lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;return&lt;/SPAN&gt; entities.Sales_by_Year(start, end); &lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;} &lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;} &lt;BR&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: consolas; FONT-SIZE: 9.5pt"&gt;} &lt;/P&gt;&lt;/SPAN&gt;
&lt;P&gt;&lt;STRONG&gt;13.&lt;/STRONG&gt; Right click on the service and select “View in Browser”.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;14.&lt;/STRONG&gt; Copy the URL shown in the browser, it should look like this: &lt;I&gt;http://localhost:11968/NorthwindService.svc&lt;/I&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;15.&lt;/STRONG&gt; In the console application project add a new service reference.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;16.&lt;/STRONG&gt; Paste the URL into the “Address” field. Change the “Namespace” to “NorthwindServiceReference”, as shown below.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/IntroducingtheMicrosoftOpenDataProtocolV_A319/image_4.png" mce_href="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/IntroducingtheMicrosoftOpenDataProtocolV_A319/image_4.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/IntroducingtheMicrosoftOpenDataProtocolV_A319/image_thumb_1.png" width=543 height=444 mce_src="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/IntroducingtheMicrosoftOpenDataProtocolV_A319/image_thumb_1.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;17.&lt;/STRONG&gt; Click OK.&lt;/P&gt;
&lt;H4&gt;2.3 Visualizing the Model&lt;/H4&gt;
&lt;P&gt;The visualizer consists of two main components: The &lt;B&gt;diagram&lt;/B&gt;, which can show all, or part of the model, as a two-dimensional graph, and the &lt;B&gt;model browser&lt;/B&gt;, which is a Visual Studio tool window that presents the complete contents of the model as a hierarchical tree. We begin by examining the structure and capabilities of the diagram.&lt;/P&gt;
&lt;H4&gt;2.4 Launching the Visualizer&lt;/H4&gt;
&lt;P&gt;Once installed, the visualizer is launched by right-clicking any Service Reference that supports the Open Data Protocol&lt;A title=_GoBack name=_GoBack&gt;&lt;/A&gt; and selecting “View in Diagram”:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/IntroducingtheMicrosoftOpenDataProtocolV_A319/image_6.png" mce_href="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/IntroducingtheMicrosoftOpenDataProtocolV_A319/image_6.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/IntroducingtheMicrosoftOpenDataProtocolV_A319/image_thumb_2.png" width=365 height=410 mce_src="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/IntroducingtheMicrosoftOpenDataProtocolV_A319/image_thumb_2.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;This will bring up the overview screen in a new document window. This screen provides a number of quick links for rapidly creating a diagram:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/IntroducingtheMicrosoftOpenDataProtocolV_A319/image_8.png" mce_href="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/IntroducingtheMicrosoftOpenDataProtocolV_A319/image_8.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/IntroducingtheMicrosoftOpenDataProtocolV_A319/image_thumb_3.png" width=631 height=253 mce_src="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/IntroducingtheMicrosoftOpenDataProtocolV_A319/image_thumb_3.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;TABLE style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; BORDER-COLLAPSE: collapse; BORDER-TOP: medium none; BORDER-RIGHT: medium none; mso-border-alt: solid #4f81bd 1.0pt; mso-border-themecolor: accent1; mso-yfti-tbllook: 1184; mso-padding-alt: 0in 5.4pt 0in 5.4pt" class=MsoTableMediumList2Accent1 border=1 cellSpacing=0 cellPadding=0 class="MsoTableMediumList2Accent1"&gt;
&lt;TBODY&gt;
&lt;TR style="mso-yfti-irow: -1; mso-yfti-firstrow: yes"&gt;
&lt;TD style="BORDER-BOTTOM: #4f81bd 3pt solid; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 149.4pt; PADDING-RIGHT: 5.4pt; BACKGROUND: white; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-bottom-themecolor: accent1; mso-background-themecolor: background1" vAlign=top width=199&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt; mso-yfti-cnfc: 517" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Cambria','serif'; COLOR: black; FONT-SIZE: 12pt; mso-ascii-theme-font: major-latin; mso-fareast-font-family: 'Times New Roman'; mso-fareast-theme-font: major-fareast; mso-hansi-theme-font: major-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: major-bidi; mso-themecolor: text1"&gt;&lt;STRONG&gt;Link&lt;/STRONG&gt; 
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;/SPAN&gt;&lt;/TD&gt;
&lt;TD style="BORDER-BOTTOM: #4f81bd 3pt solid; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 329.4pt; PADDING-RIGHT: 5.4pt; BACKGROUND: white; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-bottom-themecolor: accent1; mso-background-themecolor: background1" vAlign=top width=439&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt; mso-yfti-cnfc: 1" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Cambria','serif'; COLOR: black; FONT-SIZE: 12pt; mso-ascii-theme-font: major-latin; mso-fareast-font-family: 'Times New Roman'; mso-fareast-theme-font: major-fareast; mso-hansi-theme-font: major-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: major-bidi; mso-themecolor: text1"&gt;&lt;STRONG&gt;Behavior &lt;/STRONG&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR style="mso-yfti-irow: 0"&gt;
&lt;TD style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 149.4pt; PADDING-RIGHT: 5.4pt; BACKGROUND: white; BORDER-TOP: medium none; BORDER-RIGHT: #4f81bd 1pt solid; PADDING-TOP: 0in; mso-background-themecolor: background1; mso-border-right-themecolor: accent1" vAlign=top width=199&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt; mso-yfti-cnfc: 68" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Cambria','serif'; COLOR: black; mso-ascii-theme-font: major-latin; mso-fareast-font-family: 'Times New Roman'; mso-fareast-theme-font: major-fareast; mso-hansi-theme-font: major-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: major-bidi; mso-themecolor: text1"&gt;Data services model browser 
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;/SPAN&gt;&lt;/TD&gt;
&lt;TD style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 329.4pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #d3dfee; BORDER-TOP: medium none; BORDER-RIGHT: #4f81bd 1pt solid; PADDING-TOP: 0in; mso-background-themecolor: accent1; mso-border-right-themecolor: accent1; mso-background-themetint: 63" vAlign=top width=439&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt; mso-yfti-cnfc: 64" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Cambria','serif'; COLOR: black; mso-ascii-theme-font: major-latin; mso-fareast-font-family: 'Times New Roman'; mso-fareast-theme-font: major-fareast; mso-hansi-theme-font: major-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: major-bidi; mso-themecolor: text1"&gt;Will make the model browser tool window visible. 
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR style="mso-yfti-irow: 1"&gt;
&lt;TD style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 149.4pt; PADDING-RIGHT: 5.4pt; BACKGROUND: white; BORDER-TOP: medium none; BORDER-RIGHT: #4f81bd 1pt solid; PADDING-TOP: 0in; mso-background-themecolor: background1; mso-border-right-themecolor: accent1" vAlign=top width=199&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt; mso-yfti-cnfc: 4" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Cambria','serif'; COLOR: black; mso-ascii-theme-font: major-latin; mso-fareast-font-family: 'Times New Roman'; mso-fareast-theme-font: major-fareast; mso-hansi-theme-font: major-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: major-bidi; mso-themecolor: text1"&gt;Add all namespaces 
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;/SPAN&gt;&lt;/TD&gt;
&lt;TD style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 329.4pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; BORDER-RIGHT: #4f81bd 1pt solid; PADDING-TOP: 0in; mso-border-right-themecolor: accent1" vAlign=top width=439&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Cambria','serif'; COLOR: black; mso-ascii-theme-font: major-latin; mso-fareast-font-family: 'Times New Roman'; mso-fareast-theme-font: major-fareast; mso-hansi-theme-font: major-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: major-bidi; mso-themecolor: text1"&gt;Adds all entity types and complex types, and by extension, all associations, to the model. 
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR style="mso-yfti-irow: 2"&gt;
&lt;TD style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 149.4pt; PADDING-RIGHT: 5.4pt; BACKGROUND: white; BORDER-TOP: medium none; BORDER-RIGHT: #4f81bd 1pt solid; PADDING-TOP: 0in; mso-background-themecolor: background1; mso-border-right-themecolor: accent1" vAlign=top width=199&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt; mso-yfti-cnfc: 68" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Cambria','serif'; COLOR: black; mso-ascii-theme-font: major-latin; mso-fareast-font-family: 'Times New Roman'; mso-fareast-theme-font: major-fareast; mso-hansi-theme-font: major-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: major-bidi; mso-themecolor: text1"&gt;Add all entity types 
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;/SPAN&gt;&lt;/TD&gt;
&lt;TD style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 329.4pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #d3dfee; BORDER-TOP: medium none; BORDER-RIGHT: #4f81bd 1pt solid; PADDING-TOP: 0in; mso-background-themecolor: accent1; mso-border-right-themecolor: accent1; mso-background-themetint: 63" vAlign=top width=439&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt; mso-yfti-cnfc: 64" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Cambria','serif'; COLOR: black; mso-ascii-theme-font: major-latin; mso-fareast-font-family: 'Times New Roman'; mso-fareast-theme-font: major-fareast; mso-hansi-theme-font: major-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: major-bidi; mso-themecolor: text1"&gt;Will add all entity types, and any associations between them, to the diagram. 
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR style="mso-yfti-irow: 3"&gt;
&lt;TD style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 149.4pt; PADDING-RIGHT: 5.4pt; BACKGROUND: white; BORDER-TOP: medium none; BORDER-RIGHT: #4f81bd 1pt solid; PADDING-TOP: 0in; mso-background-themecolor: background1; mso-border-right-themecolor: accent1" vAlign=top width=199&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt; mso-yfti-cnfc: 4" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Cambria','serif'; COLOR: black; mso-ascii-theme-font: major-latin; mso-fareast-font-family: 'Times New Roman'; mso-fareast-theme-font: major-fareast; mso-hansi-theme-font: major-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: major-bidi; mso-themecolor: text1"&gt;Add all hubs 
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;/SPAN&gt;&lt;/TD&gt;
&lt;TD style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 329.4pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; BORDER-RIGHT: #4f81bd 1pt solid; PADDING-TOP: 0in; mso-border-right-themecolor: accent1" vAlign=top width=439&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Cambria','serif'; COLOR: black; mso-ascii-theme-font: major-latin; mso-fareast-font-family: 'Times New Roman'; mso-fareast-theme-font: major-fareast; mso-hansi-theme-font: major-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: major-bidi; mso-themecolor: text1"&gt;Will add the entity types whose number of associations is in the top 25% in the model to the diagram. This is intended to provide a useful starting point in making sense of models by adding only the most highly connected types. 
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR style="mso-yfti-irow: 4"&gt;
&lt;TD style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 149.4pt; PADDING-RIGHT: 5.4pt; BACKGROUND: white; BORDER-TOP: medium none; BORDER-RIGHT: #4f81bd 1pt solid; PADDING-TOP: 0in; mso-background-themecolor: background1; mso-border-right-themecolor: accent1" vAlign=top width=199&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt; mso-yfti-cnfc: 68" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Cambria','serif'; COLOR: black; mso-ascii-theme-font: major-latin; mso-fareast-font-family: 'Times New Roman'; mso-fareast-theme-font: major-fareast; mso-hansi-theme-font: major-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: major-bidi; mso-themecolor: text1"&gt;Add all complex types 
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;/SPAN&gt;&lt;/TD&gt;
&lt;TD style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 329.4pt; PADDING-RIGHT: 5.4pt; BACKGROUND: #d3dfee; BORDER-TOP: medium none; BORDER-RIGHT: #4f81bd 1pt solid; PADDING-TOP: 0in; mso-background-themecolor: accent1; mso-border-right-themecolor: accent1; mso-background-themetint: 63" vAlign=top width=439&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt; mso-yfti-cnfc: 64" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Cambria','serif'; COLOR: black; mso-ascii-theme-font: major-latin; mso-fareast-font-family: 'Times New Roman'; mso-fareast-theme-font: major-fareast; mso-hansi-theme-font: major-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: major-bidi; mso-themecolor: text1"&gt;Will add all complex types to the diagram. 
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR style="mso-yfti-irow: 5; mso-yfti-lastrow: yes"&gt;
&lt;TD style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 149.4pt; PADDING-RIGHT: 5.4pt; BACKGROUND: white; BORDER-TOP: medium none; BORDER-RIGHT: #4f81bd 1pt solid; PADDING-TOP: 0in; mso-background-themecolor: background1; mso-border-right-themecolor: accent1" vAlign=top width=199&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt; mso-yfti-cnfc: 4" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Cambria','serif'; COLOR: black; mso-ascii-theme-font: major-latin; mso-fareast-font-family: 'Times New Roman'; mso-fareast-theme-font: major-fareast; mso-hansi-theme-font: major-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: major-bidi; mso-themecolor: text1"&gt;Add all associations 
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;/SPAN&gt;&lt;/TD&gt;
&lt;TD style="BORDER-BOTTOM: #4f81bd 1pt solid; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 5.4pt; WIDTH: 329.4pt; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; BORDER-RIGHT: #4f81bd 1pt solid; PADDING-TOP: 0in; mso-border-bottom-themecolor: accent1; mso-border-right-themecolor: accent1" vAlign=top width=439&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN-BOTTOM: 0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Cambria','serif'; COLOR: black; mso-ascii-theme-font: major-latin; mso-fareast-font-family: 'Times New Roman'; mso-fareast-theme-font: major-fareast; mso-hansi-theme-font: major-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: major-bidi; mso-themecolor: text1"&gt;Adds all associations and their entity types to the diagram. 
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;H4&gt;2.5 Working with a Diagram&lt;/H4&gt;
&lt;P&gt;&lt;STRONG&gt;1.&lt;/STRONG&gt; Selecting “add all hubs” will result in the following diagram:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/IntroducingtheMicrosoftOpenDataProtocolV_A319/image_10.png" mce_href="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/IntroducingtheMicrosoftOpenDataProtocolV_A319/image_10.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/IntroducingtheMicrosoftOpenDataProtocolV_A319/image_thumb_4.png" width=166 height=244 mce_src="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/IntroducingtheMicrosoftOpenDataProtocolV_A319/image_thumb_4.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;2.&lt;/STRONG&gt; Deselect any selected objects (by clicking anywhere on the canvas) and right-click the “Employee” shape to bring up this context menu:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/IntroducingtheMicrosoftOpenDataProtocolV_A319/image_12.png" mce_href="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/IntroducingtheMicrosoftOpenDataProtocolV_A319/image_12.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/IntroducingtheMicrosoftOpenDataProtocolV_A319/image_thumb_5.png" width=303 height=295 mce_src="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/IntroducingtheMicrosoftOpenDataProtocolV_A319/image_thumb_5.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Select “Add Related Entities”.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;3.&lt;/STRONG&gt; Click on Employees again and select “Add Related Complex Types”.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;4.&lt;/STRONG&gt; Switch to the left-to-right view (Alt+Right Arrow.) &lt;BR&gt;The diagram now shows all entity types related to Employee as well any complex types used by it:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/IntroducingtheMicrosoftOpenDataProtocolV_A319/image_14.png" mce_href="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/IntroducingtheMicrosoftOpenDataProtocolV_A319/image_14.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/IntroducingtheMicrosoftOpenDataProtocolV_A319/image_thumb_6.png" width=206 height=244 mce_src="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/IntroducingtheMicrosoftOpenDataProtocolV_A319/image_thumb_6.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;5.&lt;/STRONG&gt; Multi-select Order and Product and select “Add Related Entities”. At this point, most of the model will be visible in the diagram. Note that all newly added objects are now selected. This is intended to accomplish two goals: Allow easy iterative addition of related types to a model, and also make it easy to distinguish newly added types from previously added types.&lt;/P&gt;
&lt;H5&gt;2.5.1 Visualizing Relationships&lt;/H5&gt;
&lt;P&gt;&lt;STRONG&gt;1.&lt;/STRONG&gt; We can further simplify the rendering of the model by changing the way shapes are rendered. Right click anywhere in the diagram and unmark the “Expanded Shapes” checkbox command. This will hide all properties, making it easier to focus on relationships between types:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/IntroducingtheMicrosoftOpenDataProtocolV_A319/image_16.png" mce_href="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/IntroducingtheMicrosoftOpenDataProtocolV_A319/image_16.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/IntroducingtheMicrosoftOpenDataProtocolV_A319/image_thumb_7.png" width=244 height=225 mce_src="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/IntroducingtheMicrosoftOpenDataProtocolV_A319/image_thumb_7.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;2.&lt;/STRONG&gt; Selecting an association will highlight the navigation properties that navigate it. For example, after expanding the shapes to show properties again, we select the association between Employee and Territory and see that navigation properties Employee.Territories and Territory. Employees, which traverse this association, become highlighted:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/IntroducingtheMicrosoftOpenDataProtocolV_A319/image_18.png" mce_href="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/IntroducingtheMicrosoftOpenDataProtocolV_A319/image_18.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/IntroducingtheMicrosoftOpenDataProtocolV_A319/image_thumb_8.png" width=244 height=182 mce_src="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/IntroducingtheMicrosoftOpenDataProtocolV_A319/image_thumb_8.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;H3&gt;3 Using the Model Browser&lt;/H3&gt;
&lt;P&gt;The Model Browser provides an unfiltered view of the model. Its root contains a schema node for each namespace in a model, and a node the EntityContainer.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/IntroducingtheMicrosoftOpenDataProtocolV_A319/image_20.png" mce_href="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/IntroducingtheMicrosoftOpenDataProtocolV_A319/image_20.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/IntroducingtheMicrosoftOpenDataProtocolV_A319/image_thumb_9.png" width=292 height=278 mce_src="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/IntroducingtheMicrosoftOpenDataProtocolV_A319/image_thumb_9.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;To show the model browser, go to the “View” menu item in Visual Studio and select “Data Services Model Browser”. You can also right-click in the visualizer and select “Show In Model Browser”, which will bring the model browser into view and select the object under the mouse.&lt;/P&gt;
&lt;H4&gt;3.1 Schema Nodes&lt;/H4&gt;
&lt;P&gt;Schema nodes show the entity types, complex types, and associations in a schema.&lt;/P&gt;
&lt;P&gt;To add a type to the diagram, expand the Entity Types node and drag and drop it onto the diagram. You can also right-click the type and click on “Select in Diagram,” or double-click it. This will add the type to the diagram if it is not present, select it, and scroll the diagram to make the type shape visible.&lt;/P&gt;
&lt;P&gt;These same actions also work for complex types and associations. In the latter case, adding an association to the diagram will add both of the association’s ends’ entity types as well.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;STRONG&gt;1.&lt;/STRONG&gt; Clear the diagram by selecting all objects using Ctrl+A and removing them using the Delete key. &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;2.&lt;/STRONG&gt; Double-click the “Employee” entity type.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;3.&lt;/STRONG&gt; Drag and drop “Order” onto the diagram. Note that the location of the drop does not matter, as the layout in the diagram is always automatic.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;4.&lt;/STRONG&gt; Right-click the “Address” complex type and click on “Select In Diagram”. Finally, double-click on the “FK_Orders_Shippers” association. With a left to right layout, your diagram should look like this:&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/IntroducingtheMicrosoftOpenDataProtocolV_A319/image_22.png" mce_href="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/IntroducingtheMicrosoftOpenDataProtocolV_A319/image_22.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/IntroducingtheMicrosoftOpenDataProtocolV_A319/image_thumb_10.png" width=244 height=206 mce_src="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/IntroducingtheMicrosoftOpenDataProtocolV_A319/image_thumb_10.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Note that the addition of the foreign key added the “Shipper” type and selected both it and “Order”, which make up both sides of the association, and also selected the two navigation properties, “Order.Shipper” and “Shipper.Orders”, which traverse this association.&lt;/P&gt;
&lt;H5&gt;3.1.1 Properties&lt;/H5&gt;
&lt;P&gt;While the diagram surface does not yet allow selection of properties, the model browser does. Expand the Entity Types node, and within it, expand the “Category” type. Right-click “CategoryID” and select “View Generated Code” to see the code generated for this property. Close the code, right-click “CategoryID” and select “Properties” to view the property sheet for it.&lt;/P&gt;
&lt;H4&gt;3.2 EntityContainer Nodes&lt;/H4&gt;
&lt;P&gt;Expand the Entity Sets node and right-click on “Categories”. Selecting “View Generated Code” will take you to the dataServiceQuery&amp;lt;Category&amp;gt; that was generated from this entity set. Next, select “Go to Entity Type”, which should select the “Category” type. Finally, select “View in Browser” which will bring up the browser and point it at http://[your server]/NorthwindDataService.svc/Categories. Note that selecting “View In Browser” on entity types, for example on “Category”, will bring up the same URL, as all such queries must reference a type’s entity set.&lt;/P&gt;
&lt;H4&gt;3.3 The Search Bar&lt;/H4&gt;
&lt;P&gt;At the top of the model browser is the search bar. Collapse down the model browser to its root node and click the search box labeled “Type here to search”. In the search box, type “cat” and hit enter or click on the icon. The search will cover all objects in the entity container and schema nodes, down to individual properties or association ends. The model browser will show the search results bar, expand all nodes with matches and highlight those matches, and provide tick marks on the scroll bar:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/IntroducingtheMicrosoftOpenDataProtocolV_A319/image_24.png" mce_href="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/IntroducingtheMicrosoftOpenDataProtocolV_A319/image_24.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/IntroducingtheMicrosoftOpenDataProtocolV_A319/image_thumb_11.png" width=292 height=521 mce_src="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/IntroducingtheMicrosoftOpenDataProtocolV_A319/image_thumb_11.png"&gt;&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Click the up/down arrows to the right of the “Items matching…” message to move forward and back through results. You can also click on tick marks, which will scroll the corresponding match into view and select it. When you are done, click the button at the right of the search results bar to clear out the search. You can perform this search again any time by selecting the search from the search box’s drop-down search history:&lt;/P&gt;
&lt;H3&gt;4. Conclusion&lt;/H3&gt;
&lt;P&gt;This walkthrough does not touch on some additional capabilities of the visualization tool, such as the ability to display data services-specific metadata. We will cover these capabilities, and others, when we release the next update to this tool.&lt;/P&gt;
&lt;P&gt;We hope you will find this tool useful and look forward to your feedback.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Noam Ben-Ami &amp;amp; Fabian Winternitz&lt;BR&gt;&lt;/STRONG&gt;Microsoft&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9923781" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/astoriateam/attachment/9923781.ashx" length="64364" type="application/octet-stream" /><category domain="http://blogs.msdn.com/astoriateam/archive/tags/ADO.NET+Data+Services/default.aspx">ADO.NET Data Services</category><category domain="http://blogs.msdn.com/astoriateam/archive/tags/Data+Services+Futures/default.aspx">Data Services Futures</category><category domain="http://blogs.msdn.com/astoriateam/archive/tags/OData/default.aspx">OData</category></item><item><title>Breaking Down ‘Data Silos’ – The Open Data Protocol (OData)</title><link>http://blogs.msdn.com/astoriateam/archive/2009/11/17/breaking-down-data-silos-the-open-data-protocol-odata.aspx</link><pubDate>Tue, 17 Nov 2009 09:39:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9923457</guid><dc:creator>dpblogs</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/astoriateam/comments/9923457.aspx</comments><wfw:commentRss>http://blogs.msdn.com/astoriateam/commentrss.aspx?PostID=9923457</wfw:commentRss><description>&lt;P&gt;A few weeks ago we &lt;A href="http://blogs.msdn.com/astoriateam/archive/2009/10/19/share-your-data-across-data-sources-sharepoint-sql-server-azure-reporting-services-etc-applications-net-silverlight-excel-etc-using-data-services.aspx" mce_href="http://blogs.msdn.com/astoriateam/archive/2009/10/19/share-your-data-across-data-sources-sharepoint-sql-server-azure-reporting-services-etc-applications-net-silverlight-excel-etc-using-data-services.aspx"&gt;posted&lt;/A&gt; about steps we’ve been taking to enable a wide range of data sources (DB, SharePoint, Reports, Cloud storage services, etc) to expose their data for programmatic access from any platform (Java, PHP, Silverlight, .NET, AJAX, etc) using a simple HTTP/AtomPub based protocol as the means of communication.&amp;nbsp; Our exploration in the area of data sharing has been driven by frustration we’ve observed in the broader community around the fact that data tends to exist in horizontal or vertical silos: it can be shared within a particular environment but often becomes difficult to use beyond its original intent. For example, one factor that can contribute to such a “silo effect”, is application domain/business logic that changes the shape of its data such that it is harder to share. As systems continue to become more interconnected, the need to reuse information in its raw form or exposed through layers of domain/business logic grows and, it probably goes without saying, such data becomes more valuable the more it can be shared. It is this need for data sharing, regardless of the type of data source, where the “silo effect” becomes increasingly painful.&lt;/P&gt;
&lt;P&gt;Driven by the goal to enable simple data sharing across disparate data sources, today, at &lt;A href="http://microsoftpdc.com/" mce_href="http://microsoftpdc.com/"&gt;PDC&lt;/A&gt;, we are announcing the &lt;A href="http://www.odata.org/" mce_href="http://www.odata.org/"&gt;Open Data Protocol (OData)&lt;/A&gt;.&amp;nbsp; OData is an open protocol for sharing data that provides a way to break down data silos and increase the shared value of data by creating an ecosystem in which data consumers can interoperate with data producers in a way that is far more powerful than currently possible, enabling more applications to make sense of a broader set of data. Every producer and consumer of data that participates in this ecosystem increases its overall value. This is similar in many ways to Microsoft’s efforts with ODBC, although applied to the Web environment and supporting a variety of data sources including (but not limited to) relational databases, file systems, content management systems, and traditional web sites.&lt;/P&gt;
&lt;P&gt;OData applies web technologies such as &lt;A href="http://www.w3.org/Protocols/" mce_href="http://www.w3.org/Protocols/"&gt;HTTP&lt;/A&gt;, &lt;A href="http://www.ietf.org/rfc/rfc4287.txt" mce_href="http://www.ietf.org/rfc/rfc4287.txt"&gt;Atom Publishing Protocol &lt;/A&gt;(AtomPub) and &lt;A href="http://json.org/" mce_href="http://json.org/"&gt;JSON&lt;/A&gt; to provide access to information from a variety of applications, services, and stores and will be published under the &lt;A href="http://www.microsoft.com/interop/osp/default.mspx" mce_href="http://www.microsoft.com/interop/osp/default.mspx"&gt;Open Specification Promise&lt;/A&gt; to allow anyone to freely interoperate with OData implementations.&amp;nbsp; OData was previously known informally as the “&lt;A href="http://msdn.microsoft.com/en-us/library/dd541188(PROT.10).aspx" mce_href="http://msdn.microsoft.com/en-us/library/dd541188(PROT.10).aspx"&gt;data services protocol&lt;/A&gt;”, however, we’re renaming the specification to better express its intent.&amp;nbsp; We are very interested in working with the web community around how to best align OData to future versions of AtomPub or other appropriate standards and welcome participation from anyone interesting in furthering the type of data sharing ecosystem OData strives to enable.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;From a Microsoft standpoint, the &lt;A href="http://msdn.microsoft.com/en-us/data/bb931106.aspx" mce_href="http://msdn.microsoft.com/en-us/data/bb931106.aspx"&gt;Data Services framework&lt;/A&gt; was the first Microsoft technology to support the Open Data Protocol in Visual Studio 2008 SP1 and provides developers with client libraries for .NET, Silverlight, AJAX, PHP and Java. In addition to developing WCF Data Services, Microsoft currently supports the OData in &lt;A href="http://www.microsoft.com/sqlserver/2008/" mce_href="http://www.microsoft.com/sqlserver/2008/"&gt;SQL Server&lt;/A&gt; 2008 R2, &lt;A href="http://msdn.microsoft.com/en-us/library/dd179423.aspx" mce_href="http://msdn.microsoft.com/en-us/library/dd179423.aspx"&gt;Windows Azure Table Storage&lt;/A&gt;, Excel 2010 (through &lt;A href="http://www.powerpivot.com/" mce_href="http://www.powerpivot.com/"&gt;PowerPivot&lt;/A&gt;) and &lt;A href="http://sharepoint2010.microsoft.com/product/Benefits/IT-Developers/Pages/Top-Features.aspx" mce_href="http://sharepoint2010.microsoft.com/product/Benefits/IT-Developers/Pages/Top-Features.aspx"&gt;SharePoint 2010&lt;/A&gt; with many other applications (such as &lt;A href="http://www.microsoft.com/mediaroom/" mce_href="http://www.microsoft.com/mediaroom/"&gt;Microsoft Mediaroom&lt;/A&gt;) in the works.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;In addition to MSFT technologies, we’ve also already seen interest in the community to grow the OData ecosystem.&amp;nbsp; For example, &lt;A href="http://www.ibm.com/developerworks/websphere/downloads/xs_rest_service.html" mce_href="http://www.ibm.com/developerworks/websphere/downloads/xs_rest_service.html"&gt;IBM’s WebSphere eXtreme Scale project implements the protocol&lt;/A&gt; to enable broad accessibility to their grid technologies. &lt;/P&gt;
&lt;P&gt;We’re actively working to provide more public facing data and tools for OData.&amp;nbsp; For now, be sure to check out &lt;A href="http://www.odata.org/" mce_href="http://www.odata.org"&gt;www.odata.org&lt;/A&gt;. As we progress we’ll be sure to post our thoughts and ideas for your feedback.&amp;nbsp; We look forward to your feedback and participation in this effort.&lt;/P&gt;
&lt;P&gt;-Mike Flasko&lt;/P&gt;
&lt;P&gt;Lead Program Manager, Microsoft&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9923457" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/astoriateam/archive/tags/PDC/default.aspx">PDC</category><category domain="http://blogs.msdn.com/astoriateam/archive/tags/ADO.NET+Data+Services/default.aspx">ADO.NET Data Services</category><category domain="http://blogs.msdn.com/astoriateam/archive/tags/What_2700_s+New/default.aspx">What's New</category><category domain="http://blogs.msdn.com/astoriateam/archive/tags/OData/default.aspx">OData</category></item><item><title>Simplifying our n-tier development platform: making 3 things 1 thing</title><link>http://blogs.msdn.com/astoriateam/archive/2009/11/17/simplifying-our-n-tier-development-platform-making-3-things-1-thing.aspx</link><pubDate>Tue, 17 Nov 2009 09:39:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9923458</guid><dc:creator>dpblogs</dc:creator><slash:comments>6</slash:comments><comments>http://blogs.msdn.com/astoriateam/comments/9923458.aspx</comments><wfw:commentRss>http://blogs.msdn.com/astoriateam/commentrss.aspx?PostID=9923458</wfw:commentRss><description>&lt;P&gt;As you’ve probably observed, we’ve been working hard over the past year or so to grow our application stacks to better support the types of applications (Silverlight, rich desktop, AJAX, etc) and services (SOAP, REST, etc) that are required to build modern, robust solutions.&amp;nbsp; At present, a few of the technologies we have to help in building services &amp;amp; n-tier applications are: &lt;A href="http://msdn.microsoft.com/en-us/netframework/aa663324.aspx" mce_href="http://msdn.microsoft.com/en-us/netframework/aa663324.aspx"&gt;Windows Communication Foundation&lt;/A&gt;, &lt;A href="http://www.silverlight.net/riaservices/" mce_href="http://www.silverlight.net/riaservices/"&gt;.NET RIA Services&lt;/A&gt; and &lt;A href="http://msdn.microsoft.com/en-us/data/bb931106.aspx" mce_href="http://msdn.microsoft.com/en-us/data/bb931106.aspx"&gt;ADO.NET Data Services&lt;/A&gt;.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;We’ve been very pleased to see each of these stacks be well received in the community and, given that positive feedback, we’ve been eagerly working on expanding each based on your comments.&amp;nbsp; While today these stacks target different application scenarios and/or levels of abstraction, we see opportunities to align their foundations by building the concepts shared in each stack (authentication, conventions for business logic, logging, configuration, etc) on a single foundation.&amp;nbsp; Additionally, we’ve heard your feedback that traversing our offerings in this space is, at times, too complicated.&lt;/P&gt;
&lt;P&gt;So, with the goal of simplifying our platform by aligning common components, we’d like to announce a few changes we’ll be making to achieve our goals….&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Windows Communication Foundation (WCF) == your “one stop shop” for building services and n-tier applications&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;Since .NET Fx 3.0, WCF has been the place to go to in the .NET Framework to rapidly build service-oriented applications that communicate across the web and the enterprise.&amp;nbsp; As we’ve developed the product roadmaps for .NET RIA Services and ADO.NET Data Services we’ve found they complement the core WCF stack quite well as components/extensions for WCF or as new top-level layers of abstraction.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;To formalize our direction in aligning these technologies, we’re making a few name changes in the .NET Framework 4 timeframe.&amp;nbsp; ADO.NET Data Services will change its name slightly to be &lt;B&gt;WCF Data Services &lt;/B&gt;and .NET RIA Services will be known as &lt;B&gt;WCF RIA Services&lt;/B&gt;.&amp;nbsp; We’ll be talking about our alignment of these technologies starting at this &lt;A href="http://microsoftpdc.com/" mce_href="http://microsoftpdc.com/"&gt;PDC&lt;/A&gt;, so if you are attending, keep an eye out for sessions and information at the event.&lt;/P&gt;
&lt;P&gt;We think of these name changes as a key first step in simplifying our offerings in this space.&amp;nbsp; Starting at this PDC and continuing over the coming Silverlight &amp;amp; .NET Framework releases cycles, you’ll see us further bring together these applications stacks such that you can leverage key parts of each in one WCF-based application.&amp;nbsp; As we progress along this path we’ll be sure to post our thinking to get your feedback. &lt;/P&gt;
&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;&lt;B&gt;Q&amp;amp;A&lt;/B&gt;&lt;/P&gt;
&lt;P&gt;We thought this might generate a few questions, so here’s a couple Q&amp;amp;As on the topic that should help clarify this announcement…&lt;/P&gt;
&lt;P&gt;Q: Now that the names are aligned, when will alignment occur in the products?&lt;/P&gt;
&lt;P&gt;A:&amp;nbsp; We’ll start aligning the technologies in the .NET Framework 4 and Silverlight 4 timeframes and, guided by your feedback, continue through subsequent release cycles as appropriate.&lt;/P&gt;
&lt;P&gt;Q: Doesn’t ADO.NET Data Services and .NET RIA Services already use WCF?&lt;/P&gt;
&lt;P&gt;A: They do, but we believe we can further their alignment &amp;amp; integration to provide a more seamless developer experience.&lt;/P&gt;
&lt;P&gt;Q: Does this mean you are changing the direction of Data Services?&lt;/P&gt;
&lt;P&gt;A: The vision we have for Data Services does not change with this announcement. We believe this announcement further solidifies our investment in the area of simple, standards-based communication&amp;nbsp;on the web by (overtime) bringing support for the Data Services conventions directly into WCF.&amp;nbsp;&amp;nbsp;For further details, see this post on our future&amp;nbsp;direction regarding data services and OData support: &lt;A href="http://blogs.msdn.com/astoriateam/archive/2009/11/17/breaking-down-data-silos-the-open-data-protocol-odata.aspx"&gt;http://blogs.msdn.com/astoriateam/archive/2009/11/17/breaking-down-data-silos-the-open-data-protocol-odata.aspx&lt;/A&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Q: How does this announcement affect the planned Data Services update for .NET Fx 3.5 SP1?&lt;/P&gt;
&lt;P&gt;A: It doesn’t.&amp;nbsp; The Data Services update for .NET Fx 3.5 SP1 will ship as planned this calendar year.&lt;/P&gt;
&lt;P&gt;-Mike Flasko&lt;/P&gt;
&lt;P&gt;Lead Program Manager, &lt;STRIKE&gt;ADO.NET&lt;/STRIKE&gt; WCF Data Services&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9923458" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/astoriateam/archive/tags/Project+Codename+_2600_quot_3B00_Astoria_2600_quot_3B00_/default.aspx">Project Codename &amp;quot;Astoria&amp;quot;</category><category domain="http://blogs.msdn.com/astoriateam/archive/tags/PDC/default.aspx">PDC</category><category domain="http://blogs.msdn.com/astoriateam/archive/tags/ADO.NET+Data+Services/default.aspx">ADO.NET Data Services</category><category domain="http://blogs.msdn.com/astoriateam/archive/tags/What_2700_s+New/default.aspx">What's New</category></item><item><title>Enabling X-Domain access to your Data Services</title><link>http://blogs.msdn.com/astoriateam/archive/2009/11/05/enabling-x-domain-access-to-your-data-services.aspx</link><pubDate>Fri, 06 Nov 2009 06:43:08 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9918413</guid><dc:creator>dpblogs</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/astoriateam/comments/9918413.aspx</comments><wfw:commentRss>http://blogs.msdn.com/astoriateam/commentrss.aspx?PostID=9918413</wfw:commentRss><description>&lt;p&gt;In the Astoria V1.5 CTP2 release, we introduced support for &lt;a href="http://blogs.msdn.com/astoriateam/archive/2009/09/03/using-the-ado-net-data-services-silverlight-client-in-x-domain-and-out-of-browser-scenarios-i.aspx"&gt;X-Domain and Out Of Browser access to Data Services&lt;/a&gt; in our Silverlight client library. &lt;/p&gt;  &lt;p&gt;This blog post talks about how to enable Cross-Domain access to Data Services from the Silverlight client library. &lt;/p&gt;  &lt;h3&gt;I am a Service author, How do I enable X-Domain access to Data Services I host in my applications?&lt;/h3&gt;  &lt;p&gt;You would need to deploy a ClientAccessPolicy.xml file to enable X-Domain and Out Of Browser access to Data Services hosted by your applications. &lt;/p&gt;  &lt;p&gt;The CAP.xml file should be deployed at the root of the Web Server hosting the Data Services and should not require authentication to access the file.&lt;/p&gt;  &lt;h3&gt;&lt;b&gt;What is a &lt;/b&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/cc197955%28VS.95,lightweight%29.aspx"&gt;ClientAccessPolicy.xml&lt;/a&gt;&lt;b&gt;&lt;/b&gt;&lt;b&gt; file? &lt;/b&gt;&lt;/h3&gt;  &lt;p&gt;A client access policy file defines the Services that client Silverlight applications can call    &lt;br /&gt;and the capabilities that these service calls can have.     &lt;br /&gt;Here is a sample client access policy.xml file : &lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;     &lt;br /&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&amp;lt;access-policy&amp;gt;     &lt;br /&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&amp;#160; &amp;lt;cross-domain-access&amp;gt;     &lt;br /&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;policy&amp;gt;     &lt;br /&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;allow-from http-request-headers=&amp;quot;*&amp;quot;&amp;gt;     &lt;br /&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;domain uri=&amp;quot;http://ui.norhtwind.com&amp;quot;/&amp;gt;     &lt;br /&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/allow-from&amp;gt;     &lt;br /&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;grant-to&amp;gt;     &lt;br /&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;resource path=&amp;quot;/Northwind.svc&amp;quot; include-subpaths=&amp;quot;true&amp;quot;/&amp;gt;     &lt;br /&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/grant-to&amp;gt;     &lt;br /&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/policy&amp;gt;     &lt;br /&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&amp;#160; &amp;lt;/cross-domain-access&amp;gt;     &lt;br /&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&amp;lt;/access-policy&amp;gt;&lt;/font&gt;&lt;/p&gt;  &lt;h3&gt;Anatomy of&amp;#160; a ClientAccessPolicy.xml file:&lt;/h3&gt;  &lt;p&gt;The CAP.xml file contains a lot of sections to allow fine tuning of client access.    &lt;br /&gt;For a Data Service author, the following are relevant sections of the file:    &lt;br /&gt;     &lt;br /&gt;1. &lt;b&gt;&amp;lt;allow-from&amp;gt; &lt;/b&gt;&lt;/p&gt;  &lt;p&gt;Defines all the domains that are affected by this policy.    &lt;br /&gt;    &lt;br /&gt;Defines the sites that are allowed to access resources in a certain policy.     &lt;br /&gt;    &lt;br /&gt;By using the allow-from element for a particular policy, you implicitly deny access for all non-listed domains. &lt;/p&gt;  &lt;p&gt;If allow-from is empty, then the policy file grants access to no sites.    &lt;br /&gt;    &lt;br /&gt;The “&lt;b&gt;http-request-headers&lt;/b&gt;”&amp;#160; attribute of this node specifies the HTTP Request headers that client Service calls are allowed to pass to the Service. &lt;/p&gt;  &lt;p&gt;For a Data Services Silverlight client application, the following headers are required &lt;/p&gt;  &lt;ol&gt;   &lt;ol&gt;     &lt;li&gt;X-Http-Method &lt;/li&gt;      &lt;li&gt;DataServiceVersion&amp;#160; &lt;/li&gt;      &lt;li&gt;Accept &lt;/li&gt;      &lt;li&gt;Content-Type &lt;/li&gt;      &lt;li&gt;Location &lt;/li&gt;      &lt;li&gt;MimeType&amp;#160; &lt;/li&gt;      &lt;li&gt;MaxDataServiceVersion &lt;/li&gt;   &lt;/ol&gt; &lt;/ol&gt;  &lt;p&gt;2. &amp;lt;&lt;b&gt;allow-from&amp;gt;&amp;lt;domain/&amp;gt;&amp;lt;/allow-from&amp;gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;The &lt;b&gt;“uri”&lt;/b&gt; attribute of the “&lt;b&gt;domain&lt;/b&gt;” node specifies the domain in which the client accessing the Service has to be hosted     &lt;br /&gt;to be able to call the Service.&lt;/p&gt;  &lt;p&gt;3. &lt;b&gt;&amp;lt;grant-to&amp;gt; &lt;/b&gt;&lt;/p&gt;  &lt;p&gt;The “&amp;lt;grant-to&amp;gt;” node specifies the Services which are allowed to be accessed by clients. &lt;/p&gt;  &lt;p&gt;4. &lt;b&gt;&amp;lt;grant-to&amp;gt;&amp;lt;resource/&amp;gt;&amp;lt;/grant-to&amp;gt; &lt;/b&gt;&lt;/p&gt;  &lt;p&gt;Each service , access to which is governed by the CAP.xml file, is represented by a &lt;b&gt;&amp;lt;resource&amp;gt; &lt;/b&gt;node in the &lt;b&gt;&amp;lt;grant-to&amp;gt;&lt;/b&gt; section of the CAP.xml file .     &lt;br /&gt;    &lt;br /&gt;The &lt;b&gt;&amp;lt;resource&amp;gt; &lt;/b&gt;node contains two important attributes. &lt;/p&gt;  &lt;ol&gt;   &lt;ol&gt;     &lt;li&gt;&lt;b&gt;path &lt;/b&gt;: this attribute is the relative path of the Data Service &lt;/li&gt;      &lt;li&gt;&lt;strong&gt;include-subpaths&lt;/strong&gt;&amp;#160; : this attribute specifies if paths based off of the resource path are allowed. This value should be set to true for a Data Service. &lt;/li&gt;   &lt;/ol&gt; &lt;/ol&gt;  &lt;h3&gt;Additional references:&lt;/h3&gt;  &lt;ol&gt;   &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/cc645032%28VS.95%29.aspx"&gt;Clientaccesspolicy.xml file Schema&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/cc197955%28VS.95%29.aspx"&gt;Making a Service Available Across Domain Boundaries&lt;/a&gt;&lt;/li&gt; &lt;/ol&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9918413" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/astoriateam/archive/tags/ADO.NET+Data+Services/default.aspx">ADO.NET Data Services</category><category domain="http://blogs.msdn.com/astoriateam/archive/tags/Silverlight/default.aspx">Silverlight</category><category domain="http://blogs.msdn.com/astoriateam/archive/tags/How+To/default.aspx">How To</category><category domain="http://blogs.msdn.com/astoriateam/archive/tags/X-Domain/default.aspx">X-Domain</category></item><item><title>Using Data Services over SharePoint 2010 – Part 2 - CRUD</title><link>http://blogs.msdn.com/astoriateam/archive/2009/10/29/using-data-services-over-sharepoint-2010-part-2-crud.aspx</link><pubDate>Thu, 29 Oct 2009 21:23:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9914952</guid><dc:creator>dpblogs</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/astoriateam/comments/9914952.aspx</comments><wfw:commentRss>http://blogs.msdn.com/astoriateam/commentrss.aspx?PostID=9914952</wfw:commentRss><description>&lt;P&gt;In &lt;A href="http://blogs.msdn.com/astoriateam/archive/2009/10/21/using-data-services-over-sharepoint-2010-part-1-getting-started.aspx" mce_href="http://blogs.msdn.com/astoriateam/archive/2009/10/21/using-data-services-over-sharepoint-2010-part-1-getting-started.aspx"&gt;part 1&lt;/A&gt; you learned how to get SharePoint 2010 and Astoria working together, how to add a Service Reference to your Client Application and how to do a basic insert. &lt;/P&gt;
&lt;P&gt;In this installment you will see full CRUD, so you’ll learn how to do queries, data binding, updates and deletes.&lt;/P&gt;
&lt;H3&gt;The Problem:&lt;/H3&gt;
&lt;P&gt;In &lt;A href="http://blogs.msdn.com/astoriateam/archive/2009/10/21/using-data-services-over-sharepoint-2010-part-1-getting-started.aspx" mce_href="http://blogs.msdn.com/astoriateam/archive/2009/10/21/using-data-services-over-sharepoint-2010-part-1-getting-started.aspx"&gt;part 1&lt;/A&gt; we created a ‘Make a Suggestion’ feature for a department Line of Business application, by storing suggestions in SharePoint 2010.&lt;/P&gt;
&lt;P&gt;Now we need a little Silverlight application for reviewing all those suggestions and making comments on them. So we need to display interesting suggestions, to allow the user to provide a comment, or make edits and deletes.&lt;/P&gt;
&lt;H3&gt;The Solution:&lt;/H3&gt;
&lt;H4&gt;Step 1: Displaying suggestions&lt;/H4&gt;
&lt;P&gt;Assuming you’ve set-up your service reference (see &lt;A href="http://blogs.msdn.com/astoriateam/archive/2009/10/21/using-data-services-over-sharepoint-2010-part-1-getting-started.aspx" mce_href="http://blogs.msdn.com/astoriateam/archive/2009/10/21/using-data-services-over-sharepoint-2010-part-1-getting-started.aspx"&gt;part 1&lt;/A&gt;) the next step is to create XAML to display the Suggestions:&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#0000ff face="Courier New"&gt;&amp;lt;UserControl x:Class="DataServicesOverSharepoint.MainPage" &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns="&lt;/FONT&gt;&lt;A href="http://schemas.microsoft.com/winfx/2006/xaml/presentation" mce_href="http://schemas.microsoft.com/winfx/2006/xaml/presentation"&gt;&lt;FONT color=#0000ff face="Courier New"&gt;http://schemas.microsoft.com/winfx/2006/xaml/presentation&lt;/FONT&gt;&lt;/A&gt;&lt;FONT color=#0000ff face="Courier New"&gt;" &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:x="&lt;/FONT&gt;&lt;A href="http://schemas.microsoft.com/winfx/2006/xaml" mce_href="http://schemas.microsoft.com/winfx/2006/xaml"&gt;&lt;FONT color=#0000ff face="Courier New"&gt;http://schemas.microsoft.com/winfx/2006/xaml&lt;/FONT&gt;&lt;/A&gt;&lt;FONT color=#0000ff face="Courier New"&gt;" &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:d="&lt;/FONT&gt;&lt;A href="http://schemas.microsoft.com/expression/blend/2008" mce_href="http://schemas.microsoft.com/expression/blend/2008"&gt;&lt;FONT color=#0000ff face="Courier New"&gt;http://schemas.microsoft.com/expression/blend/2008&lt;/FONT&gt;&lt;/A&gt;&lt;FONT color=#0000ff face="Courier New"&gt;" xmlns:mc="&lt;/FONT&gt;&lt;A href="http://schemas.openxmlformats.org/markup-compatibility/2006" mce_href="http://schemas.openxmlformats.org/markup-compatibility/2006"&gt;&lt;FONT color=#0000ff face="Courier New"&gt;http://schemas.openxmlformats.org/markup-compatibility/2006&lt;/FONT&gt;&lt;/A&gt;&lt;FONT color=#0000ff face="Courier New"&gt;" &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480"&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Grid x:Name="LayoutRoot" ShowGridLines="False"&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Grid.RowDefinitions&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;lt;RowDefinition Height="5"/&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;lt;RowDefinition Height="400"/&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;lt;RowDefinition Height="300"/&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;lt;RowDefinition Height="30" /&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;lt;RowDefinition Height="5" /&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Grid.RowDefinitions&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Grid.ColumnDefinitions&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;lt;ColumnDefinition Width="5"/&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;lt;ColumnDefinition Width="500"/&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;lt;ColumnDefinition Width="5"/&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Grid.ColumnDefinitions&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ListBox ItemsSource="{Binding TrackedSuggestions, Mode=TwoWay}" Name="ListBox" Grid.Row="1" Grid.Column="1" ScrollViewer.VerticalScrollBarVisibility="Auto"&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;lt;ListBox.ItemTemplate&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; &amp;lt;DataTemplate&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;StackPanel Orientation="Horizontal" Margin="5"&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;StackPanel Orientation="Vertical" Margin="5"&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;&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;lt;StackPanel Orientation="Horizontal"&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;&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;lt;TextBlock Width="400" Text="{Binding Title}" FontWeight="Bold"/&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;&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;lt;/StackPanel&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;&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;lt;StackPanel Orientation="Horizontal"&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;&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;lt;TextBlock Width="400" Text="{Binding Description}" TextWrapping="Wrap"/&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;&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;lt;/StackPanel&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/StackPanel&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Button Content="Delete" Click="DeleteSuggestion" Tag="{Binding}" Width="50" Height="30" VerticalAlignment="Center" HorizontalAlignment="Center"/&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/StackPanel&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; &amp;lt;/DataTemplate&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;lt;/ListBox.ItemTemplate&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/ListBox&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;StackPanel Orientation="Vertical" Margin="5" Grid.Column="1" Grid.Row="2"&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;lt;StackPanel Orientation="Horizontal"&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; &amp;lt;TextBlock Width="100" Text="Title:" FontWeight="Bold"/&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; &amp;lt;TextBox Width="300" Text="{Binding ElementName=ListBox, Path=SelectedItem.Title, Mode=TwoWay}"/&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;lt;/StackPanel&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;lt;StackPanel Orientation="Horizontal"&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; &amp;lt;TextBlock Width="100" Text="Description:" FontWeight="Bold"/&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; &amp;lt;TextBox Width="300" Text="{Binding ElementName=ListBox, Path=SelectedItem.Description, Mode=TwoWay}"/&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;lt;/StackPanel&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;lt;StackPanel Orientation="Horizontal"&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; &amp;lt;TextBlock Width="100" Text="Created:" FontWeight="Bold"/&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; &amp;lt;TextBox Width="300" Text="{Binding ElementName=ListBox, Path=SelectedItem.Created, Mode=TwoWay}"/&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;lt;/StackPanel&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;lt;StackPanel Orientation="Horizontal"&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; &amp;lt;TextBlock Width="100" Text="Modified:" FontWeight="Bold"/&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; &amp;lt;TextBox Width="300" Text="{Binding ElementName=ListBox, Path=SelectedItem.Modified, Mode=TwoWay}"/&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;lt;/StackPanel&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;lt;StackPanel Orientation="Horizontal"&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; &amp;lt;TextBlock Width="100" Text="Comments:" FontWeight="Bold"/&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; &amp;lt;TextBox Width="300" Height="150" Text="{Binding ElementName=ListBox, Path=SelectedItem.Comments, Mode=TwoWay}" AcceptsReturn="True" /&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;lt;/StackPanel&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/StackPanel&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;StackPanel Orientation="Horizontal" Grid.Row="3" Grid.Column="1" Margin="5"&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;lt;Button Width="100" Name="btnNewSuggestion" HorizontalAlignment="Left" Content="New Suggestion"/&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;lt;Button Width="100" Name="btnSaveChanges" HorizontalAlignment="Right" Content="Save Changes"/&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/StackPanel&amp;gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/Grid&amp;gt; &lt;BR&gt;&amp;lt;/UserControl&amp;gt;&lt;/FONT&gt; &lt;/P&gt;
&lt;P&gt;This XAML code, displays a ListBox (of suggestions) and an series of textboxes for editing the currently selected suggestion. &lt;BR&gt;&lt;BR&gt;When running it should looks something like this:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/UsingDataServicesoverSharePoint2010Part2_8CCB/SuggestionsVisualizer.jpg" mce_href="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/UsingDataServicesoverSharePoint2010Part2_8CCB/SuggestionsVisualizer.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=SuggestionsVisualizer border=0 alt=SuggestionsVisualizer src="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/UsingDataServicesoverSharePoint2010Part2_8CCB/SuggestionsVisualizer_thumb.jpg" width=169 height=244 mce_src="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/UsingDataServicesoverSharePoint2010Part2_8CCB/SuggestionsVisualizer_thumb.jpg"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;To make this work we have a very simple class to encapsulate Data Services and the Data:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;public class SuggestionContext &lt;BR&gt;{ &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TeamSiteDataContext _ctx; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DataServiceCollection&amp;lt;SuggestionsItem&amp;gt; _suggestions; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public TeamSiteDataContext DataContext &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; get &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; if (_ctx == null) &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; _ctx = new TeamSiteDataContext( &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 Uri( &lt;BR&gt;http://mflasko-dev/_vti_bin/listdata.svc, &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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; UriKind.Absolute &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; ) &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; ); &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; return _ctx; &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;&amp;nbsp;&amp;nbsp;&amp;nbsp; public DataServiceCollection&amp;lt;SuggestionsItem&amp;gt; TrackedSuggestions &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; get &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; if (_suggestions == null) &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; _suggestions = DataServiceCollection.CreateTracked&amp;lt;SuggestionsItem&amp;gt;(DataContext); &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; return _suggestions; &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;/FONT&gt;&lt;/P&gt;
&lt;P&gt;This class has two properties, both evaluated on first access. &lt;/P&gt;
&lt;P&gt;One gets the DataServiceContext and the other gets a DataServiceCollection which will hold, and track changes to, a collection of Suggestions. &lt;/P&gt;
&lt;P&gt;The SuggestionContext is then exposed as a property of our Silverlight UserControl: &lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;private SuggestionContext _currentContext; &lt;BR&gt;public SuggestionContext CurrentContext { &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; get { &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (_currentContext == null) &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; _currentContext = new SuggestionContext(); &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return _currentContext; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;BR&gt;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Next in the constructor of our UserControl we use this as the DataContext for our layout root, we call GetSuggestionsWithNoComments() to retrieve the interesting suggestions, and finally we hookup some event handlers for our buttons, so we can add a new suggestion and save any changes we make back to the database.&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;public MainPage() &lt;BR&gt;{ &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; InitializeComponent(); &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; GetSuggestionsWithNoComments(); &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LayoutRoot.DataContext = CurrentContext; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.btnSaveChanges.Click += new RoutedEventHandler(SaveChanges_Click); &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.btnNewSuggestion.Click += new RoutedEventHandler(AddNewSuggestion); &lt;BR&gt;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;The GetSuggestionsWithNoComments() method looks like this: &lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;public void GetSuggestionsWithNoComments() &lt;BR&gt;{ &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var query = ( &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from suggestion in CurrentContext.DataContext.Suggestions &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where suggestion.Comments == null &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; select suggestion &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ) as DataServiceQuery&amp;lt;SuggestionsItem&amp;gt;; &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; query.BeginExecute( &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (IAsyncResult asyncResult) =&amp;gt; Dispatcher.BeginInvoke(() =&amp;gt; &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; DataServiceQuery&amp;lt;SuggestionsItem&amp;gt; queryResults = asyncResult.AsyncState as DataServiceQuery&amp;lt;SuggestionsItem&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; if (queryResults != null) &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; CurrentContext.TrackedSuggestions.Clear(true); &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; CurrentContext.TrackedSuggestions.Load( &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;&amp;nbsp; queryResults.EndExecute(asyncResult) &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; } &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; , query &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ); &lt;BR&gt;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;It executes an asynchronous query to retrieve the interesting suggestions and load them into the CurrentContext.TrackedSuggestions collection. Which in turn causes the ListBox to fill, because of the data binding we’ve set up.&lt;/P&gt;
&lt;H4&gt;Step 2: Inserting, Editing and Deleting suggestions&lt;/H4&gt;
&lt;P&gt;Now in our XAML we’ve already setup two way data binding from our textboxes back to the suggestion selected in the ListBox, so as we make changes in the TextBoxes the Suggestion is modified, and those changes are tracked by the DataServiceCollection. &lt;/P&gt;
&lt;P&gt;So that covers Editing.&lt;/P&gt;
&lt;P&gt;Insert is handled by the ‘New Suggestion’ button. The event handler looks like this:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;void AddNewSuggestion(object sender, RoutedEventArgs e) &lt;BR&gt;{ &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CurrentContext.TrackedSuggestions.Add( &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; new SuggestionsItem { &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; Title = "{Enter a title}", &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; Description = "", &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; Modified = DateTime.Now, &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; Created = DateTime.Now &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;&amp;nbsp;&amp;nbsp;&amp;nbsp; ListBox.SelectedIndex = CurrentContext.TrackedSuggestions.Count - 1; &lt;BR&gt;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;As you can see this creates a new Suggestion, adds it to the DataServiceCollection, and then tells the ListBox to select the new Suggestion so it can be modified via our TextBoxes.&lt;/P&gt;
&lt;P&gt;In our XAML we added a Delete button to each ListBoxItem, this event is bound to those buttons:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;private void DeleteSuggestion(object sender, RoutedEventArgs e) &lt;BR&gt;{ &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Button b = sender as Button; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SuggestionsItem toDelete = b.Tag as SuggestionsItem; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CurrentContext.TrackedSuggestions.Remove(toDelete); &lt;BR&gt;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;This relies on the fact that when during DataBinding we put the Suggestion in the button’s Tag property, so all we do when the button is clicked, is retrieve the current Suggestion and remove the suggestion from the TrackedSuggestions collection. This is interpreted as a delete. &lt;/P&gt;
&lt;H4&gt;Step 3: Submitting your changes&lt;/H4&gt;
&lt;P&gt;Because we are using a DataServiceCollection, every Insert, Edit and Delete is automatically tracked for us. &lt;/P&gt;
&lt;P&gt;But as yet they haven’t been committed to the server.&lt;/P&gt;
&lt;P&gt;To do that you have to click the “Save Changes” button, which calls this code: &lt;BR&gt;&lt;BR&gt;&lt;FONT face="Courier New"&gt;void SaveChanges_Click(object sender, RoutedEventArgs e) &lt;BR&gt;{ &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CurrentContext.DataContext.BeginSaveChanges( &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (IAsyncResult asyncResult) =&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; Dispatcher.BeginInvoke( &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;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; CurrentContext.DataContext.EndSaveChanges(asyncResult); &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; GetSuggestionsWithNoComments(); &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; ) &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; , CurrentContext &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ); &lt;BR&gt;}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;As per usual the request is invoked asynchronously, in this case by calling BeginSaveChanges. &lt;/P&gt;
&lt;P&gt;One thing to note is that once we’ve actually saved the changes we refresh the list of Suggestions by calling GetSuggestionsWithNoComments() again. &lt;/P&gt;
&lt;P&gt;The idea here is that once we’ve edited some suggestions they may not longer be interesting for us, or there maybe some new suggestions on the server.&lt;/P&gt;
&lt;H3&gt;Summary:&lt;/H3&gt;
&lt;P&gt;As you can see it is really easy to create a Silverlight application that uses Data Services to query and manipulate list data.&lt;/P&gt;
&lt;P&gt;In Part 3 we will cover how to interact with blobs (i.e. Documents, Images etc), and look&amp;nbsp;out for an upcoming&amp;nbsp;&lt;A href="http://blogs.msdn.com/astoriateam/archive/2009/11/05/enabling-x-domain-access-to-your-data-services.aspx" mce_href="http://blogs.msdn.com/astoriateam/archive/2009/11/05/enabling-x-domain-access-to-your-data-services.aspx"&gt;blog post covering X-Domain Policy&lt;/A&gt; which is important if your Silverlight application isn’t hosted on the same web-server as Sharepoint.&lt;/P&gt;
&lt;P&gt;As always don’t hesitate to leave a comment.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/alexj" mce_href="http://blogs.msdn.com/alexj"&gt;&lt;STRONG&gt;Alex James&lt;/STRONG&gt;&lt;/A&gt; &lt;BR&gt;Program Manager Microsoft&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9914952" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/astoriateam/archive/tags/ADO.NET+Data+Services/default.aspx">ADO.NET Data Services</category><category domain="http://blogs.msdn.com/astoriateam/archive/tags/Sharepoint/default.aspx">Sharepoint</category><category domain="http://blogs.msdn.com/astoriateam/archive/tags/Silverlight/default.aspx">Silverlight</category><category domain="http://blogs.msdn.com/astoriateam/archive/tags/How+To/default.aspx">How To</category><category domain="http://blogs.msdn.com/astoriateam/archive/tags/What_2700_s+New/default.aspx">What's New</category></item><item><title>Using Data Services over SharePoint 2010 – Part 1 – Getting Started</title><link>http://blogs.msdn.com/astoriateam/archive/2009/10/21/using-data-services-over-sharepoint-2010-part-1-getting-started.aspx</link><pubDate>Wed, 21 Oct 2009 18:21:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9910793</guid><dc:creator>dpblogs</dc:creator><slash:comments>5</slash:comments><comments>http://blogs.msdn.com/astoriateam/comments/9910793.aspx</comments><wfw:commentRss>http://blogs.msdn.com/astoriateam/commentrss.aspx?PostID=9910793</wfw:commentRss><description>&lt;p&gt;&lt;a href="http://blogs.msdn.com/adonet/archive/2009/09/01/ado-net-data-services-v1-5-ctp2-now-available.aspx" mce_href="http://blogs.msdn.com/adonet/archive/2009/09/01/ado-net-data-services-v1-5-ctp2-now-available.aspx"&gt;ADO.NET Data Services 1.5&lt;/a&gt; and &lt;a href="http://sharepoint.microsoft.com" mce_href="http://sharepoint.microsoft.com"&gt;SharePoint 2010&lt;/a&gt; allow developers to write applications against SharePoint Lists using the familiar Data Services Client programming model. &lt;/p&gt;
&lt;h3&gt;Setup&lt;/h3&gt;
&lt;p&gt;The SharePoint 2010 beta will become generally available in &lt;a href="http://www.microsoft.com/presspass/press/2009/oct09/10-19MSSharePointConf09PR.mspx" mce_href="http://www.microsoft.com/presspass/press/2009/oct09/10-19MSSharePointConf09PR.mspx"&gt;November&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;In order to use Data Services with SharePoint 2010 Beta, ADO.NET Data Services 1.5 must be installed on your server, ideally *before* you install SharePoint 2010. &lt;br&gt;&lt;br&gt;If however SharePoint 2010 is already on your box when you install Data Services, you will need an &lt;a href="http://www.bing.com/search?q=iisreset&amp;amp;go=&amp;amp;form=QBLH&amp;amp;qs=n" mce_href="http://www.bing.com/search?q=iisreset&amp;amp;go=&amp;amp;form=QBLH&amp;amp;qs=n"&gt;iisreset&lt;/a&gt; to make the Data Service Endpoint show-up.&lt;br&gt;&lt;/p&gt;
&lt;p&gt;And then to program against a Data Services enabled SharePoint box you need either:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;VS 2008 SP1 with the ADO.NET Data Services 1.5 installed (&lt;a href="http://blogs.msdn.com/adonet/archive/2009/09/01/ado-net-data-services-v1-5-ctp2-now-available.aspx" mce_href="http://blogs.msdn.com/adonet/archive/2009/09/01/ado-net-data-services-v1-5-ctp2-now-available.aspx"&gt;CTP 2&lt;/a&gt; or higher) &lt;br&gt;&lt;br&gt;or &lt;br&gt;&lt;/li&gt;
&lt;li&gt;VS 2010 (&lt;a href="http://blogs.msdn.com/somasegar/archive/2009/10/19/announcing-visual-studio-2010-and-net-fx-4-beta-2.aspx" mce_href="http://blogs.msdn.com/somasegar/archive/2009/10/19/announcing-visual-studio-2010-and-net-fx-4-beta-2.aspx"&gt;Beta 2&lt;/a&gt; or higher) &lt;/li&gt;&lt;/ul&gt;
&lt;h3&gt;Where is your Data Service Endpoint?&lt;/h3&gt;
&lt;p&gt;Assuming you’ve got everything setup and working the first thing you need to know is where your Data Service endpoint is installed.&lt;/p&gt;
&lt;p&gt;If your SharePoint site is &lt;b&gt;http://mflasko-dev/&lt;/b&gt; (thanks Mike) then your Data Services endpoint will be &lt;b&gt;http://mflasko-dev/_vti_bin/listdata.svc&lt;/b&gt;.&lt;/p&gt;
&lt;p&gt;If you open one of these endpoints up in Internet Explorer you’ll see something like this:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/UsingDataServicesoverSharepoint2010_A5DF/DataServiceRoot.jpg" mce_href="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/UsingDataServicesoverSharepoint2010_A5DF/DataServiceRoot.jpg"&gt;&lt;img src="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/UsingDataServicesoverSharepoint2010_A5DF/DataServiceRoot_thumb.jpg" style="border-width: 0px; display: inline;" title="DataServiceRoot" alt="DataServiceRoot" mce_src="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/UsingDataServicesoverSharepoint2010_A5DF/DataServiceRoot_thumb.jpg" width="226" border="0" height="244"&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;As you can see this is a standard Data Services Atom feed, listing all the Lists on the SharePoint site.&lt;/p&gt;
&lt;p&gt;Cool.&lt;/p&gt;
&lt;p&gt;Once you know where your Data Service is located, the next step is to write your Data Services Client application.&lt;/p&gt;
&lt;h3&gt;Create the Sharepoint Application:&lt;/h3&gt;
&lt;p&gt;But first to demonstrate how easy this is, I’ve used SharePoint to create the simplest of all Suggestion Tracking applications. &lt;/p&gt;
&lt;p&gt;You can follow along by following these simple steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Create a ‘Suggestions’ list which is based on an ‘Issues’ list. &lt;/li&gt;
&lt;li&gt;Finished! &lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;The resulting list looks something like this:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/UsingDataServicesoverSharepoint2010_A5DF/Suggestions.jpg" mce_href="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/UsingDataServicesoverSharepoint2010_A5DF/Suggestions.jpg"&gt;&lt;img src="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/UsingDataServicesoverSharepoint2010_A5DF/Suggestions_thumb.jpg" style="border-width: 0px; display: inline;" title="Suggestions" alt="Suggestions" mce_src="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/UsingDataServicesoverSharepoint2010_A5DF/Suggestions_thumb.jpg" width="244" border="0" height="35"&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The idea is that this list will capture all the suggestions users have for making a departmental line of business (LOB) application better. &lt;/p&gt;
&lt;p&gt;But rather than making people go to the SharePoint site to make the suggestion, we want to allow the users to do it right in the LOB application.&lt;/p&gt;
&lt;h3&gt;Talking to Sharepoint using Data Services:&lt;/h3&gt;
&lt;p&gt;The first step as always to add a service reference, using the location of the Data Service that exposes SharePoint data (i.e. &lt;b&gt;http://mflasko-dev/_vti_bin/listdata.svc&lt;/b&gt;)&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/UsingDataServicesoverSharepoint2010_A5DF/AddServiceReference.jpg" mce_href="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/UsingDataServicesoverSharepoint2010_A5DF/AddServiceReference.jpg"&gt;&lt;img src="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/UsingDataServicesoverSharepoint2010_A5DF/AddServiceReference_thumb.jpg" style="border-width: 0px; display: inline;" title="AddServiceReference" alt="AddServiceReference" mce_src="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/UsingDataServicesoverSharepoint2010_A5DF/AddServiceReference_thumb.jpg" width="244" border="0" height="198"&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Once you’ve done this you will have CLR classes representing the types in each list, and you will have a strongly typed DataServiceContext called TeamSiteDataContext that allows you to access the data:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/UsingDataServicesoverSharepoint2010_A5DF/ObjectBrowser.jpg" mce_href="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/UsingDataServicesoverSharepoint2010_A5DF/ObjectBrowser.jpg"&gt;&lt;img src="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/UsingDataServicesoverSharepoint2010_A5DF/ObjectBrowser_thumb.jpg" style="border-width: 0px; display: inline;" title="ObjectBrowser" alt="ObjectBrowser" mce_src="http://blogs.msdn.com/blogfiles/astoriateam/WindowsLiveWriter/UsingDataServicesoverSharepoint2010_A5DF/ObjectBrowser_thumb.jpg" width="158" border="0" height="244"&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Rather than focusing on how the user enters the suggest in your LOB application, lets focus on how to POST that suggestion to Sharepoint. &lt;/p&gt;
&lt;p&gt;To do that you need to write a method something like this:&lt;/p&gt;
&lt;p&gt;&lt;font face="Courier New"&gt;public void PostSuggestion(string title, string description) &lt;br&gt;{ &lt;br&gt;&amp;nbsp;&amp;nbsp; TeamSiteDataContext ctx = new TeamSiteDataContext( &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; new Uri( &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;/font&gt;&lt;font face="Courier New"&gt;http://mflasko-dev/_vti_bin/listdata.svc&lt;/font&gt;&lt;font face="Courier New"&gt;,&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; UriKind.Absolute &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ) &lt;br&gt;&amp;nbsp;&amp;nbsp; ); &lt;br&gt;&amp;nbsp;&amp;nbsp; ctx.AddToSuggestions( &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; new SuggestionsItem{ &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Title = title,&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Description = description &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;br&gt;&amp;nbsp;&amp;nbsp; ); &lt;br&gt;&amp;nbsp;&amp;nbsp; ctx.SaveChanges(); &lt;br&gt;}&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;As you can see this is very easy.&lt;/p&gt;
&lt;p&gt;In an environment like Silverlight it is a little more complicated because whenever you cross a network boundary have to deal with the Async and Threading issues. Which means you can’t use SaveChanges() directly.&lt;/p&gt;
&lt;p&gt;You have to use the standard BeginXXX() and EndXXX() async pattern and you need to use the Dispatcher to ensure the results are marshaled back on the UI thread:&lt;/p&gt;&lt;font face="Courier New"&gt;
&lt;p&gt;ctx.BeginSaveChanges( &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (IAsyncResult result) =&amp;gt; Dispatcher.BeginInvoke( &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; () =&amp;gt; ctx.EndSaveChanges(result)), &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ctx &lt;br&gt;&amp;nbsp;&amp;nbsp; );&lt;/p&gt;&lt;/font&gt;
&lt;p&gt;In future blog posts we will dig into this in more detail, covering topic like Query / Update / Data Binding, Blob Handling and security policies over Sharepoint.&lt;/p&gt;
&lt;p&gt;As always we are keen to hear your comments.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;a href="http://blogs.msdn.com/alexj" mce_href="http://blogs.msdn.com/alexj"&gt;Alex James&lt;/a&gt; &lt;br&gt;&lt;/b&gt;Program Manager &lt;br&gt;Microsoft&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9910793" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/astoriateam/archive/tags/ADO.NET+Data+Services/default.aspx">ADO.NET Data Services</category><category domain="http://blogs.msdn.com/astoriateam/archive/tags/Sharepoint/default.aspx">Sharepoint</category><category domain="http://blogs.msdn.com/astoriateam/archive/tags/Silverlight/default.aspx">Silverlight</category><category domain="http://blogs.msdn.com/astoriateam/archive/tags/How+To/default.aspx">How To</category><category domain="http://blogs.msdn.com/astoriateam/archive/tags/What_2700_s+New/default.aspx">What's New</category></item><item><title>Share your data across data sources (Sharepoint, SQL Server, Azure, Reporting Services, etc) &amp; applications (.NET, Silverlight, Excel, etc) using Data Services</title><link>http://blogs.msdn.com/astoriateam/archive/2009/10/19/share-your-data-across-data-sources-sharepoint-sql-server-azure-reporting-services-etc-applications-net-silverlight-excel-etc-using-data-services.aspx</link><pubDate>Tue, 20 Oct 2009 03:32:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9909638</guid><dc:creator>dpblogs</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/astoriateam/comments/9909638.aspx</comments><wfw:commentRss>http://blogs.msdn.com/astoriateam/commentrss.aspx?PostID=9909638</wfw:commentRss><description>&lt;p&gt;This week at the &lt;a href="http://www.mssharepointconference.com/" mce_href="http://www.mssharepointconference.com/"&gt;SharePoint conference&lt;/a&gt;, &lt;a href="http://blogs.msdn.com/pablo/" mce_href="http://blogs.msdn.com/pablo/"&gt;Pablo Castro&lt;/a&gt; will be announcing that the next version of SharePoint natively integrates with data services such that all SharePoint lists will be exposed as an &lt;a href="http://msdn.microsoft.com/en-us/data/aa937699.aspx" mce_href="http://msdn.microsoft.com/en-us/data/aa937699.aspx"&gt;ADO.NET&lt;/a&gt; Data Service.&amp;nbsp; This means you can now program against SharePoint list data using all the VS tools and runtime client libraries (.NET, Silverlight, &lt;a href="http://aspnet.codeplex.com/wikipage?title=AJAX&amp;amp;referringTitle=Home" mce_href="http://aspnet.codeplex.com/wikipage?title=AJAX&amp;amp;referringTitle=Home"&gt;AJAX&lt;/a&gt;, &lt;a href="http://blogs.msdn.com/astoriateam/archive/2009/09/29/restlet-java-framework-now-with-ado-net-data-services-support.aspx" mce_href="http://blogs.msdn.com/astoriateam/archive/2009/09/29/restlet-java-framework-now-with-ado-net-data-services-support.aspx"&gt;Java&lt;/a&gt;, &lt;a href="http://blogs.msdn.com/astoriateam/archive/2009/09/08/jumpstart-your-php-ado-net-data-services-development.aspx" mce_href="http://blogs.msdn.com/astoriateam/archive/2009/09/08/jumpstart-your-php-ado-net-data-services-development.aspx"&gt;PHP&lt;/a&gt;, etc…) which support &lt;a href="http://msdn.microsoft.com/en-us/data/aa937699.aspx" mce_href="http://msdn.microsoft.com/en-us/data/aa937699.aspx"&gt;ADO.NET&lt;/a&gt; Data Services.&amp;nbsp; Also, since the Data Service interface is just plain HTTP and XML/Atom or JSON, pretty much any environment with an HTTP stack can now browse, update and interact with list and document data in SharePoint. We are very excited to be able to talk about SharePoint’s data service integration (more code-centric blogs to come on this topic) as this has been an ask we hear a lot each time we present data services. &lt;/p&gt;  &lt;p&gt;This integration is also a good example of a step towards our larger vision for data services and, more generally, open data access on the web.&amp;nbsp; The remainder of this post outlines our roadmap around data services and what parts of that roadmap we are announcing this week.&lt;/p&gt;    &lt;h3&gt;First, a bit of context…&lt;/h3&gt;  &lt;p&gt;Successful applications collect lots of valuable data. Often it is relatively easy to get data into applications but hard to get it out or to have multiple applications to use one another’s data. Part of the problem is lack of a simple, uniform way of exchanging data across systems. Server side applications such as SharePoint server are examples where it would be extremely valuable to have a general purpose data service interface. Another example is SQL Server Reporting Services, as reports frequently become the official entry point for application data. Excel and the analysis services clients in SQL Server are examples of client side applications that would greatly benefit from having readily access to data managed by applications of all kinds, from SharePoint sites to Reporting Services reports in existing applications to custom applications that expose data as services. Client mash-ups also consolidate data from multiple sources to provide valuable cross-application perspective, provided that they can actually access data from all systems. &lt;/p&gt;  &lt;h3&gt;Background on the approach&lt;/h3&gt;  &lt;p&gt;Services, instead of APIs, is what is becoming common ground for interaction across tiers or across applications, both on the web and inside organizations. Microsoft has been working on data-centric service interfaces that enable simple, effective data sharing within and across applications. The first materialization of this effort is the &lt;a href="http://msdn.microsoft.com/en-us/data/aa937699.aspx" mce_href="http://msdn.microsoft.com/en-us/data/aa937699.aspx"&gt;ADO.NET&lt;/a&gt; Data Services framework that shipped last year as part of .NET 3.5 SP1. The approach taken is to use a RESTful data service interface built on top of standard, broadly available concepts and technologies such as HTTP and &lt;a href="http://tools.ietf.org/html/rfc5023" mce_href="http://tools.ietf.org/html/rfc5023"&gt;AtomPub&lt;/a&gt;. Conventions are defined on top such that things such as metadata discovery is possible&lt;/p&gt;  &lt;h3&gt;What we are announcing&lt;/h3&gt;  &lt;p&gt;A number of products and developer tools are all now aligned around this single RESTful data service interface. More specifically: &lt;/p&gt;  &lt;h4&gt;&lt;b&gt;Developer tools: &lt;/b&gt;&lt;/h4&gt; &lt;b&gt;&lt;/b&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;We updated the protocol itself as well as our frameworks and developer tools in Visual Studio 2010, .NET 4.0 (starting with Beta 2) and Silverlight 4.&amp;nbsp; We’ll also release an &lt;a href="http://blogs.msdn.com/astoriateam/archive/2009/08/31/ado-net-data-services-v1-5-ctp2-now-available-for-download.aspx" mce_href="http://blogs.msdn.com/astoriateam/archive/2009/08/31/ado-net-data-services-v1-5-ctp2-now-available-for-download.aspx"&gt;update to .NET 3.5 SP1&lt;/a&gt;. &lt;/p&gt;  &lt;h4&gt;SharePoint: &lt;/h4&gt;  &lt;p&gt;&lt;a href="http://www.microsoft.com/presspass/press/2009/oct09/10-19MSSharePointConf09PR.mspx" mce_href="http://www.microsoft.com/presspass/press/2009/oct09/10-19MSSharePointConf09PR.mspx"&gt;Starting with SharePoint 2010&lt;/a&gt; (beta release to come in November) all SharePoint sites are automatically exposed as RESTful data services that follow the &lt;a href="http://msdn.microsoft.com/en-us/data/aa937699.aspx" mce_href="http://msdn.microsoft.com/en-us/data/aa937699.aspx"&gt;ADO.NET&lt;/a&gt; Data Services convention. Now any client with an HTTP stack can read and write to SharePoint by just using simple HTTP methods and Atom (XML) or JSON formatted data. All the rich clients that work with Data Services will work with SharePoint out of the box. &lt;/p&gt;  &lt;h4&gt;&lt;b&gt;Reporting Services: &lt;/b&gt;&lt;/h4&gt;  &lt;p&gt;Starting with SQL Server 2008 R2, all reports created with SQL Server Reporting Services will expose an option to render as an Atom feed that follows the Data Services convention as well. This makes it possible for developers and information workers to see the data “underneath” a report (whether it displays as tables, charts, etc.) and use it in their own applications. &lt;/p&gt;  &lt;h4&gt;&lt;b&gt;Excel and Microsoft SQL Server PowerPivot for Excel 2010 (aka “Project Gemini”):&lt;/b&gt;&lt;/h4&gt;  &lt;p&gt;Also starting with SQL Server 2008 R2, &lt;a href="http://www.powerpivot.com/" mce_href="http://www.powerpivot.com/"&gt;the PowerPivot plug-in for Excel&lt;/a&gt; allows information workers to bring data from all sources for analysis will natively understand and load data from any Data Service. Now information workers can obtain data from reports, SharePoint sites, public sites that expose reference data and even custom applications and load it directly into the data analysis environments. &lt;/p&gt;  &lt;h4&gt;&lt;b&gt;Cross-platform clients:&lt;/b&gt; &lt;/h4&gt;  &lt;p&gt;in addition to the &lt;a href="http://msdn.microsoft.com/en-us/data/bb931106.aspx" mce_href="http://msdn.microsoft.com/en-us/data/bb931106.aspx"&gt;.NET, Silverlight&lt;/a&gt; and &lt;a href="http://aspnet.codeplex.com/wikipage?title=AJAX&amp;amp;referringTitle=Home" mce_href="http://aspnet.codeplex.com/wikipage?title=AJAX&amp;amp;referringTitle=Home"&gt;AJAX&lt;/a&gt; clients that were already available, Microsoft sponsored open-source projects to create a &lt;a href="http://blogs.msdn.com/astoriateam/archive/2009/09/08/jumpstart-your-php-ado-net-data-services-development.aspx" mce_href="http://blogs.msdn.com/astoriateam/archive/2009/09/08/jumpstart-your-php-ado-net-data-services-development.aspx"&gt;PHP&lt;/a&gt; and a &lt;a href="http://blogs.msdn.com/astoriateam/archive/2009/09/29/restlet-java-framework-now-with-ado-net-data-services-support.aspx" mce_href="http://blogs.msdn.com/astoriateam/archive/2009/09/29/restlet-java-framework-now-with-ado-net-data-services-support.aspx"&gt;Java&lt;/a&gt; client for Data Services. Both are already publicly available. &lt;/p&gt;  &lt;p&gt;All these products introduce first class support for producing or consuming the Data Services protocol, enabling data sharing scenarios for both developers and information workers. They join other already-existing services using the Data Services protocol such as the Windows Azure Table Store. &lt;/p&gt;  &lt;p&gt;Stay tuned, more to come at the &lt;a href="http://microsoftpdc.com/" mce_href="http://microsoftpdc.com/"&gt;PDC&lt;/a&gt; &amp;amp; &lt;a href="http://www.microsoft.com/europe/teched/" mce_href="http://www.microsoft.com/europe/teched/"&gt;TechEd&lt;/a&gt; conferences later this year. &lt;/p&gt;    &lt;p&gt;&lt;b&gt;Mike Flasko&lt;/b&gt; &lt;/p&gt;  &lt;p&gt;ADO.NET Data Services, Lead Program Manager &lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9909638" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/astoriateam/archive/tags/ADO.NET+Data+Services/default.aspx">ADO.NET Data Services</category><category domain="http://blogs.msdn.com/astoriateam/archive/tags/Azure/default.aspx">Azure</category><category domain="http://blogs.msdn.com/astoriateam/archive/tags/Excel/default.aspx">Excel</category><category domain="http://blogs.msdn.com/astoriateam/archive/tags/Sharepoint/default.aspx">Sharepoint</category><category domain="http://blogs.msdn.com/astoriateam/archive/tags/Silverlight/default.aspx">Silverlight</category></item><item><title>Announcing the PHP Toolkit for ADO.NET Data Services</title><link>http://blogs.msdn.com/astoriateam/archive/2009/08/21/announcing-the-php-toolkit-for-ado-net-data-services.aspx</link><pubDate>Fri, 21 Aug 2009 18:57:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9878871</guid><dc:creator>dpblogs</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/astoriateam/comments/9878871.aspx</comments><wfw:commentRss>http://blogs.msdn.com/astoriateam/commentrss.aspx?PostID=9878871</wfw:commentRss><description>&lt;P&gt;This morning the Microsoft Interoperability team announced the release of a new project that bridges PHP and.NET: the PHP Toolkit for ADO.NET Data Services. The toolkit makes it easier for PHP developers to connect to and take advantage of services built using ADO.NET Data Services. The PHP Toolkit for ADO.NET Data Services is an open source project funded by Microsoft and developed by &lt;A href="http://www.persistentsys.com/" mce_href="http://www.persistentsys.com/"&gt;Persistent Systems&lt;/A&gt; and is available today on Codeplex at &lt;A href="http://phpdataservices.codeplex.com/" mce_href="http://phpdataservices.codeplex.com"&gt;phpdataservices.codeplex.com&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;You can see an overview and quick demo of the toolkit in the &lt;A href="http://channel9.msdn.com/posts/jccim/Consuming-data-over-the-web-between-PHP-and-NET-with-REST-and-ADONET-Data-Services/" mce_href="http://channel9.msdn.com/posts/jccim/Consuming-data-over-the-web-between-PHP-and-NET-with-REST-and-ADONET-Data-Services/"&gt;Channel9 video&lt;/A&gt; with Pablo Castro and Claudio Caldato, Senior Program Manager with the Interoperability Technical Strategy team.&lt;/P&gt;
&lt;P&gt;For more information on the toolkit check out the &lt;A href="http://blogs.msdn.com/interoperability/archive/2009/08/21/a-new-bridge-for-php-developers-to-net-through-rest-php-toolkit-for-ado-net-data-services.aspx" mce_href="http://blogs.msdn.com/interoperability/archive/2009/08/21/a-new-bridge-for-php-developers-to-net-through-rest-php-toolkit-for-ado-net-data-services.aspx"&gt;Interoperability Teams blog post&lt;/A&gt; and &lt;A href="http://phpdataservices.codeplex.com/" mce_href="http://phpdataservices.codeplex.com"&gt;phpdataservices.codeplex.com&lt;/A&gt;. &lt;/P&gt;
&lt;P&gt;- Elisa Flasko &lt;BR&gt;Program Manager, Data Programmability&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9878871" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/astoriateam/archive/tags/ADO.NET+Data+Services/default.aspx">ADO.NET Data Services</category><category domain="http://blogs.msdn.com/astoriateam/archive/tags/PHP/default.aspx">PHP</category></item><item><title>ADO.NET Data Services v1.5 CTP1 - Row Count</title><link>http://blogs.msdn.com/astoriateam/archive/2009/03/18/ado-net-data-services-v1-5-ctp1-row-count.aspx</link><pubDate>Wed, 18 Mar 2009 23:21:22 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9487878</guid><dc:creator>dpblogs</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/astoriateam/comments/9487878.aspx</comments><wfw:commentRss>http://blogs.msdn.com/astoriateam/commentrss.aspx?PostID=9487878</wfw:commentRss><description>&lt;p&gt;Peter Qian, a developer on the data services team, has posted a nice write up describing the row count feature in the &lt;a href="http://blogs.msdn.com/astoriateam/archive/2009/03/16/ado-net-data-services-v1-5-ctp1-now-available-for-download.aspx"&gt;ADO.NET Data Services v1.5 CTP1 release we made available for download yesterday&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;You can check out Peter's Row Count write up &lt;a href="http://blogs.msdn.com/peter_qian/archive/2009/03/18/getting-row-count-in-ado-net-data-services.aspx"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Also, we have created a new forum dedicated to providing feedback on &amp;quot;pre-release&amp;quot; versions of data services such as this CTP.&amp;#160; Please direct all questions and comments about this feature to this new forum which is available at: (&lt;a title="http://social.msdn.microsoft.com/Forums/en-US/dataservices/threads" href="http://social.msdn.microsoft.com/Forums/en-US/dataservices/threads" mce_href="http://social.msdn.microsoft.com/Forums/en-US/dataservices/threads"&gt;http://social.msdn.microsoft.com/Forums/en-US/dataservices/threads&lt;/a&gt;).&amp;#160; &lt;/p&gt;  &lt;p&gt;We look forward to hearing your feedback.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;-Mike Flasko&lt;/p&gt;  &lt;p&gt;ADO.NET Data Services, Program Manager&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9487878" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/astoriateam/archive/tags/ADO.NET+Data+Services/default.aspx">ADO.NET Data Services</category></item><item><title>Announcing ADO.NET Data Services v1.5 CTP1</title><link>http://blogs.msdn.com/astoriateam/archive/2009/03/01/announcing-ado-net-data-services-v1-5-ctp1.aspx</link><pubDate>Mon, 02 Mar 2009 02:24:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9453188</guid><dc:creator>dpblogs</dc:creator><slash:comments>50</slash:comments><comments>http://blogs.msdn.com/astoriateam/comments/9453188.aspx</comments><wfw:commentRss>http://blogs.msdn.com/astoriateam/commentrss.aspx?PostID=9453188</wfw:commentRss><description>&lt;P&gt;It's been a little while since we've written about the future direction of data services, so this post is intended to layout our thinking towards our next release.&amp;nbsp; The release described below isn't yet available, but should be in the coming months, so stay tuned :).&amp;nbsp; The rest of this post will discuss the specifics of the release being announced and what to expect in terms of features in CTP1.&lt;/P&gt;
&lt;P&gt;ADO.NET Data Services v1.5 CTP1 is a tech preview of the next release of ADO.NET Data Services.&amp;nbsp; This release (v1.5) will target the .NET Framework 3.5 SP1 &amp;amp; Silverlight 2 platforms and provide new client and server side features for data service developers.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Why is v1.5 in the name?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;V1 = The release of the ADO.NET Data Services runtime and client libraries included in the .NET Framework 3.5 SP1 and Silverlight 2&lt;/P&gt;
&lt;P&gt;V1.5 (this release) = A standalone web release which includes a superset of the functionality shipped in V1.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;How does this release relate to ADO.NET Data Services as shipped in the .NET Framework 3.5 SP1?&lt;/STRONG&gt;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;This release (v1.5 CTP1) is a standalone release and represents our in progress work towards the next version of the ADO.NET Data Service technology we shipped in the .NET Framework 3.5 SP1.&amp;nbsp; Since this is a standalone release, it will &lt;STRONG&gt;NOT&lt;/STRONG&gt; be an in-place update of the v1 assemblies (System.Data.Services.*.dll) in the .NET Framework 3.5 SP1.&amp;nbsp; Instead, this release will coexist with v1, allowing you the choice of building applications against either release.&amp;nbsp; Like v1, this release also targets the .NET Framework 3.5 SP1 so we can quickly iterate on a feature set which makes it easier to use data services in cloud services (e.g. Windows Azure Table Storage, etc) and to address the needs of web-focused applications which iterate on a relatively short cycle.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;How does this release relate to Silverlight 2?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;This release (v1.5 CTP1) will include an updated client library for consuming data services from Silverlight 2.&amp;nbsp; The additional features included are described in the feature list below.&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;How does this release relate to the next release of the .NET Framework (ie. .NET Framework 4.0)?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;As noted above, ADO.NET Data Services v1.5 will initially target the .NET Framework 3.5 SP1 and Silverlight 2 platforms and will likely be released prior to the .NET Framework 4.0 platform.&amp;nbsp; A future version of this standalone release (v1.5) will be created to support the .NET Framework 4.0 platform.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;When will v1.5 CTP1 ship?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;We aren't yet ready to announce a release date, but we are in the close down phase of the feature set for CTP1, so we are hoping to have more to say here in the not too distant future :).&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;What's coming in CTP1? &lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;ADO.NET Data Services v1.5 CTP1 will include the following enhancements and features:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Data Binding&lt;/STRONG&gt;: The data services client library for the .NET Framework 3.5 SP1 and Silverlight2 has been extended to support two-way data binding for WPF and Silverlight based applications.&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Row Count&lt;/STRONG&gt;: One scenario we heard a ton of feedback on after shipping V1 of ADO.NET Data Services in the .NET Framework 3.5SP1 is the ability for the a client of a data service to determine the total number of entities in a set without having to retrieve them all.&amp;nbsp; To address this need, we have extended the data services addressing scheme to allow a client to obtain this type of information without having to download all the entities in a set.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Feed Customization (aka "Web Friendly Feeds")&lt;/STRONG&gt;: A common ask we have received is to provide the ability to customize how entities are mapped into the various elements of an AtomPub feed.&amp;nbsp; This feature does just that by providing a data service author declarative control over how the data service runtime maps the properties of an entity (e.g. a Customer, Order, etc) to the elements of a feed.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Server Driven Paging&lt;/STRONG&gt;: This one is best described by example.&amp;nbsp; If you had a data service that exposes photos, you likely want to limit the total number of photos a single request to the service can retrieve because the total collection of photos may be very large.&amp;nbsp; This feature allows a service author to set per collection limits on the total number of entities returned for each request.&amp;nbsp; In addition to limiting the number of photos returned per request, the server provides the client a "next link" which is simply a URI specifying how to continue retrieving the rest of the entities in the collection not returned by the first request.&amp;nbsp; For those familiar with AtomPub, this feature adds support for AtomPub &amp;lt;next ..&amp;gt; elements to the data service runtime.&amp;nbsp;&amp;nbsp; For CTP1 we'll include server side support for this feature only.&amp;nbsp; Client library support will likely come in a future CTP.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Enhanced BLOB Support&lt;/STRONG&gt;: This feature enhances the BLOB support provided in V1 to enable data services to stream arbitrarily large BLOBs, store binary content separate from its metadata, easily defer the loading of BLOB content when its metadata is requested, etc.&amp;nbsp; For CTP1 we'll include server side support for this feature only.&amp;nbsp; Client library support will likely come in a future CTP.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;New "Data Service Provider" Interface for Custom Provider Writers&lt;/STRONG&gt;: As the data services runtime has evolved, so has the number of ways people want to plug data into the data service framework.&amp;nbsp; In V1, two methods (Entity Framework and arbitrary .NET classes) were supported to enable a data service to interact with various diverse data sources.&amp;nbsp; To address another class of environments and data sources we have &lt;A href="http://blogs.msdn.com/pablo/archive/2008/11/01/ado-net-data-services-in-windows-azure-pushing-scalability-to-the-next-level.aspx" mce_href="http://blogs.msdn.com/pablo/archive/2008/11/01/ado-net-data-services-in-windows-azure-pushing-scalability-to-the-next-level.aspx"&gt;introduced a way to write a "custom" provider&lt;/A&gt; for those cases when the previous two provider models don't meet your needs.&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Bug Fixes&lt;/STRONG&gt;: This release builds on our existing (v1) code base and will incorporate all fixes we have made to this point.&lt;/P&gt;
&lt;P&gt;We've already discussed some of the features above in our &lt;A 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;transparent design process&lt;/A&gt; notes on this blog (example: &lt;A href="http://blogs.msdn.com/astoriateam/archive/2008/12/15/design-notes-row-count.aspx" mce_href="http://blogs.msdn.com/astoriateam/archive/2008/12/15/design-notes-row-count.aspx"&gt;here&lt;/A&gt; and &lt;A href="http://blogs.msdn.com/astoriateam/archive/2008/09/28/making-feeds-friendly.aspx" mce_href="http://blogs.msdn.com/astoriateam/archive/2008/09/28/making-feeds-friendly.aspx"&gt;here&lt;/A&gt;).&amp;nbsp; This CTP release represents our take at addressing these areas, so when the release becomes available, please give these features a spin and let us know what you think.&lt;/P&gt;
&lt;P&gt;As we get closer to having the CTP1 bits ready to make available on the download center, we'll post additional documentation, samples, etc. as "getting started" material for the features. &lt;/P&gt;
&lt;P&gt;-Mike Flasko&lt;/P&gt;
&lt;P&gt;ADO.NET Data Services Program Manager&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9453188" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/astoriateam/archive/tags/ADO.NET+Data+Services/default.aspx">ADO.NET Data Services</category></item><item><title>Office Business Applications &amp; Data Services</title><link>http://blogs.msdn.com/astoriateam/archive/2009/02/20/office-business-applications-data-services.aspx</link><pubDate>Fri, 20 Feb 2009 11:57:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9435689</guid><dc:creator>dpblogs</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/astoriateam/comments/9435689.aspx</comments><wfw:commentRss>http://blogs.msdn.com/astoriateam/commentrss.aspx?PostID=9435689</wfw:commentRss><description>&lt;P&gt;&lt;A href="http://blogs.msdn.com/bethmassi/default.aspx" mce_href="http://blogs.msdn.com/bethmassi/default.aspx"&gt;Beth Massi&lt;/A&gt; has been busy creating a number of great posts describing how to build add-ins to Excel, Outlook, Word, etc to work with data from an ADO.NET Data Service.&amp;nbsp; The articles can be found here:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/bethmassi/archive/2009/01/22/ado-net-data-services-building-an-excel-client.aspx" mce_href="http://blogs.msdn.com/bethmassi/archive/2009/01/22/ado-net-data-services-building-an-excel-client.aspx"&gt;ADO.NET Data Services - Building an Excel Client&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/bethmassi/archive/2009/02/03/oba-part-1-exposing-line-of-business-data.aspx" mce_href="http://blogs.msdn.com/bethmassi/archive/2009/02/03/oba-part-1-exposing-line-of-business-data.aspx"&gt;OBA Part 1 - Exposing Line-of-Business Data&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/bethmassi/archive/2009/02/07/oba-part-2-building-and-outlook-client-against-lob-data.aspx" mce_href="http://blogs.msdn.com/bethmassi/archive/2009/02/07/oba-part-2-building-and-outlook-client-against-lob-data.aspx"&gt;OBA Part 2 - Building an Outlook Client against LOB Data&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/bethmassi/archive/2009/02/12/oba-part-3-storing-and-reading-data-in-word-documents.aspx" mce_href="http://blogs.msdn.com/bethmassi/archive/2009/02/12/oba-part-3-storing-and-reading-data-in-word-documents.aspx"&gt;OBA Part 3 - Storing and Reading Data in Word Documents&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Also, Beth graciously offered to convert the code samples from the current "Using ADO.NET Data Services" whitepaper to VB as they are currently only available in C#.&amp;nbsp; We're working on getting the VB snippets integrated into the document, but for now they are also available &lt;A href="http://code.msdn.microsoft.com/usingastoria" mce_href="http://code.msdn.microsoft.com/usingastoria"&gt;here&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;-Mike Flasko&lt;/P&gt;
&lt;P&gt;ADO.NET Data Services, Program Manager&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9435689" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/astoriateam/archive/tags/ADO.NET+Data+Services/default.aspx">ADO.NET Data Services</category></item><item><title>Timeout Workaround</title><link>http://blogs.msdn.com/astoriateam/archive/2009/01/13/timeout-workaround.aspx</link><pubDate>Tue, 13 Jan 2009 20:03:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9316017</guid><dc:creator>dpblogs</dc:creator><slash:comments>11</slash:comments><comments>http://blogs.msdn.com/astoriateam/comments/9316017.aspx</comments><wfw:commentRss>http://blogs.msdn.com/astoriateam/commentrss.aspx?PostID=9316017</wfw:commentRss><description>&lt;P&gt;Believe it or not, but we did ship ADO.NET Data Services with a few bugs.&amp;nbsp;&amp;nbsp;&amp;nbsp; One issue in particular is fairly nasty.&amp;nbsp;&amp;nbsp; However the code developers might be tempted to write to work around the bug could cause far worse problems down the road when we fix the initial bug.&amp;nbsp; Hence I wanted to give a quick write up to describe the issue and give a quick sample of how to write code that &lt;B&gt;&lt;I&gt;will work now and in the future&lt;/I&gt;&lt;/B&gt; when we fix the issue.&lt;/P&gt;
&lt;P&gt;The problem exists in the ADO.NET Data Services client (System.Data.Services.Client.dll) we shipped with .NET 3.5 sp1 and Silverlight 2.0 SDK.&amp;nbsp; In particular, we do not throw the correct exception when a HTTP request has problems while being sent to the server.&amp;nbsp; I.e. a request timeouts, there is a bad server name, etc.&amp;nbsp; In other words, any problem that would normally raise a System.Net.WebException.&amp;nbsp; Unfortunately, in V1 of ADO.NET Data Services a NullReferenceException is raised instead of a WebException and even worse, the exception message is lost:&lt;/P&gt;
&lt;DIV class=csharpcode&gt;&lt;PRE class=code&gt;DataServiceContext context = &lt;/PRE&gt;&lt;PRE class=code&gt;     &lt;SPAN style="COLOR: blue"&gt;new &lt;/SPAN&gt;DataServiceContext(&lt;/PRE&gt;&lt;PRE class=code&gt;         &lt;SPAN style="COLOR: blue"&gt;new &lt;/SPAN&gt;Uri(&lt;SPAN style="COLOR: #a31515"&gt;"http://BadServer/Northwind.svc"&lt;/SPAN&gt;));
&lt;SPAN style="COLOR: green"&gt;// Set small timeout amount to intentionally timeout request &lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE class=code&gt;context.Timeout = 1; &lt;/PRE&gt;&lt;PRE class=code&gt;DataServiceQuery&amp;lt;Customer&amp;gt; query = &lt;/PRE&gt;&lt;PRE class=code&gt;     context.CreateQuery&amp;lt;Customer&amp;gt;(&lt;SPAN style="COLOR: #a31515"&gt;"Customers"&lt;/SPAN&gt;);

&lt;SPAN style="COLOR: blue"&gt;try
&lt;/SPAN&gt;{
    &lt;SPAN style="COLOR: blue"&gt;foreach &lt;/SPAN&gt;(Customer c &lt;SPAN style="COLOR: blue"&gt;in &lt;/SPAN&gt;query) { }
}
&lt;SPAN style="COLOR: blue"&gt;catch &lt;/SPAN&gt;(&lt;SPAN style="COLOR: #2b91af"&gt;NullReferenceException &lt;/SPAN&gt;nre)
{
    &lt;SPAN style="COLOR: green"&gt;// in V1, NullReferenceException is &lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: green"&gt;    //thrown instead of WebException.
    // Also, no useful description
    &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;Console&lt;/SPAN&gt;.WriteLine(&lt;SPAN style="COLOR: #a31515"&gt;"Something bad happened!"&lt;/SPAN&gt;);
}&lt;/PRE&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;&lt;/DIV&gt;
&lt;STYLE type=text/css&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/STYLE&gt;

&lt;P&gt;We are planning on fixing this bug in a future version of ADO.NET Data Services client (both in .NET and Silverlight) so if your code relies exclusively on catching the NullReference exception, it will be broken when we ship the fix.&amp;nbsp; Hence, to make your code robust – have your code explicitly catch both exception types:&lt;/P&gt;
&lt;DIV class=csharpcode&gt;
&lt;DIV class=csharpcode&gt;&lt;PRE class=code&gt;DataServiceContext context = &lt;/PRE&gt;&lt;PRE class=code&gt;    &lt;SPAN style="COLOR: blue"&gt;new &lt;/SPAN&gt;DataServiceContext(&lt;/PRE&gt;&lt;PRE class=code&gt;        &lt;SPAN style="COLOR: blue"&gt;new &lt;/SPAN&gt;Uri(&lt;SPAN style="COLOR: #a31515"&gt;"http://BadServer/Northwind.svc"&lt;/SPAN&gt;));
&lt;SPAN style="COLOR: green"&gt;// Set small timeout amount to intentionally timeout request &lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE class=code&gt;context.Timeout = 1;  &lt;/PRE&gt;&lt;PRE class=code&gt;DataServiceQuery&amp;lt;Customer&amp;gt; query = &lt;/PRE&gt;&lt;PRE class=code&gt;    context.CreateQuery&amp;lt;Customer&amp;gt;(&lt;SPAN style="COLOR: #a31515"&gt;"Customers"&lt;/SPAN&gt;);

&lt;SPAN style="COLOR: blue"&gt;try
&lt;/SPAN&gt;{
    &lt;SPAN style="COLOR: blue"&gt;foreach &lt;/SPAN&gt;(Customer c &lt;SPAN style="COLOR: blue"&gt;in &lt;/SPAN&gt;query) { }
}
&lt;SPAN style="COLOR: blue"&gt;catch &lt;/SPAN&gt;(WebException e)
{
    &lt;SPAN style="COLOR: green"&gt;// When fix is shippped, will ADO.NET Data Services &lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: green"&gt;    // will correctly throw webException
    &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;Console&lt;/SPAN&gt;.WriteLine(e.Message);
}
&lt;SPAN style="COLOR: blue"&gt;catch &lt;/SPAN&gt;(&lt;SPAN style="COLOR: #2b91af"&gt;NullReferenceException &lt;/SPAN&gt;nre)
{
    &lt;SPAN style="COLOR: green"&gt;// in V1, NullReferenceException is thrown &lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: green"&gt;    // instead of WebException.
    // Also, no useful description
    &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;Console&lt;/SPAN&gt;.WriteLine(&lt;SPAN style="COLOR: #a31515"&gt;"Something bad happened!"&lt;/SPAN&gt;);
}&lt;/PRE&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;&lt;/DIV&gt;
&lt;STYLE type=text/css&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/STYLE&gt;
&lt;/DIV&gt;
&lt;STYLE type=text/css&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/STYLE&gt;

&lt;P&gt;We will update the team blog when we have a better idea of when the fix will be available.&amp;nbsp; All I can say now is we are looking into trying to get it out sooner than later, but we hope to have more information on this in the near future.&lt;/P&gt;
&lt;P&gt;Andrew Conrad&lt;/P&gt;
&lt;P&gt;ADO.NET Data Services Development Lead.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9316017" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/astoriateam/archive/tags/ADO.NET+Data+Services/default.aspx">ADO.NET Data Services</category></item></channel></rss>