<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" 
      xmlns:thr="http://purl.org/syndication/thread/1.0">
  <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/11/silverlight-and-adonet-data-se.html" />
  <link rel="self" type="application/atom+xml" href="http://www.insideria.com/atom.xml" />
  <id>tag:www.insideria.com,2009://34/tag:www.insideria.com,2008://34.34168-</id>
  <updated>2009-11-16T15:24:19Z</updated>
  <title>Comments for Silverlight and ADO.NET Data Services (http://www.insideria.com/2008/11/silverlight-and-adonet-data-se.html)</title>
  <generator uri="http://www.sixapart.com/movabletype/">Movable Type 4.21-en</generator>
  <entry>
    <id>tag:www.insideria.com,2008://34.34168</id>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/11/silverlight-and-adonet-data-se.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://blogs.oreilly.com/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=34/entry_id=34168" title="Silverlight and ADO.NET Data Services" />
    <published>2008-11-18T14:00:00Z</published>
    <updated>2008-11-18T12:26:56Z</updated>
    <title>Silverlight and ADO.NET Data Services</title>
    <summary>The ADO.NET Data Services client library for Silverlight makes calling RESTful services exposed by ADO.NET Data Services easy. It allows request sot be made as either URis over HTTP requests or LINQ queries from Silverlight. </summary>
    <author>
      <name>John Papa</name>
      <uri>http://johnpapa.net</uri>
    </author>
    
    <category term="Blogs" />
    
    <content type="html" xml:lang="en" xml:base="http://www.insideria.com/">
      <![CDATA[<p>SIlverlight 2 allows you to talk to RESTful services as well as SOAP based services. You can pass/consume XML or JSON with these web services too. All stuff we would expect at some pointto expose a basic domain entity model for business applications. Microsoft also has a technology called ADO.NET Data Services (codenamed Astoria). I still like the Astoria nickname as its easier to say and in my opinion the title "ADO.NET Data Services" implies a heavy connection to a data layer. While there is some truth to that, the reality is that Astoria simply exposes a domain entity model through a RESTful model over HTTP. The model could have nothing to do with ADO.NET. In fact the model could be any entity model written in .NET code as long as it exposed IQueryable<T>. This means that a standard class library in .NET code can be exposed through a RESTful set of web services over HTTP using Astoria very easily.</p>

<p>The beauty of Astoria is that it exposes the model without having to write dozens or hundreds of service methods to do so. Instead, it exposes the model thorugh a series of unique URI's that are mapped to the domain entities. For example http://mydomain/myservice.svc/customer(101)/orders?orderby=orderdate could return a list of orders for the customer with an ID = 101 sorted by order date. The data can be returned as XML or JSON, too. No service is written on the server side to handle this specific action, instead Astoria handles the mapping to the entities and offers a set of operators such as orderby and filter that can massage the data. Its a pretty slick concept overall, especially for those who love REST. The advantage here is that you don;t have to write a lot of RESTful web service methods to do this, since Astoria does that work for you iunder the covers.</p>

<p>Calling Astoria ... this can be done through any HTTP web request by passing a URI. Or, if you use Silverlight 2, you can use the Silverlight client library for Astoria which allows you to write a LINQ query to operate on the entities using the LINQ query syntax. the query is examined by the client library and turned into the URI / HTTP request. So in the end it works the same. The client library just allows a developer to make a simple request using the well known LINQ syntax if available.If you don;t want to use LINQ, you can still make a standard HTTP web request, too. There are lots of options, which is always good!</p>]]>
      
    </content>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.34168-comment:2047669</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.34168" type="text/html" href="http://www.insideria.com/2008/11/silverlight-and-adonet-data-se.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/11/silverlight-and-adonet-data-se.html#comment-2047669" />
    <title>Comment from Silverlight Travel on 2008-11-29</title>
    <author>
        <name>Silverlight Travel</name>
        <uri>http://www.silverlight-travel.com/blog/</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://www.silverlight-travel.com/blog/">
        <![CDATA[<p>It is not so ease to learn how ADO.NET Data Services works together with Silverlight but it is a great experience. Do it!</p>]]>
    </content>
    <published>2008-11-29T21:35:21Z</published>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.34168-comment:2048270</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.34168" type="text/html" href="http://www.insideria.com/2008/11/silverlight-and-adonet-data-se.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/11/silverlight-and-adonet-data-se.html#comment-2048270" />
    <title>Comment from Frank on 2008-12-06</title>
    <author>
        <name>Frank</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>I am having a difficult time with Silverlight ADO ..<br />
The latest question is when I try to add a table to the datamodel and then update the service reference, I get a error message saying the server, local host etc etc etc refuses ..</p>

<p>any thoughts?</p>]]>
    </content>
    <published>2008-12-06T21:48:24Z</published>
  </entry>

  <entry>
    <id>tag:www.insideria.com,2008://34.34168-comment:2048335</id>
    <thr:in-reply-to ref="tag:www.insideria.com,2008://34.34168" type="text/html" href="http://www.insideria.com/2008/11/silverlight-and-adonet-data-se.html"/>
    <link rel="alternate" type="text/html" href="http://www.insideria.com/2008/11/silverlight-and-adonet-data-se.html#comment-2048335" />
    <title>Comment from John Papa on 2008-12-07</title>
    <author>
        <name>John Papa</name>
        <uri>http://johnpapa.net</uri>
    </author>
    <content type="html" xml:lang="en" xml:base="http://johnpapa.net">
        <![CDATA[<p>Where you able to add the service ref in the first place and compile it and run it OK? If so, then try removing the service ref and re-add it. If you could never get it to work, make sure the service runs on the same domain as the silverlight client's web host. ADO.NET Data Services only works on the same domain right now ... no cross domain capabilities yet (for a variety of reasons they are working out). For example, if your service is on <a href="http://localhost:1234">http://localhost:1234</a> and your web site hosting silverlight is on <a href="http://localhost:6789,">http://localhost:6789,</a> it will not work. They both need to be on the same domain.</p>]]>
    </content>
    <published>2008-12-08T01:56:26Z</published>
  </entry>

</feed
