<?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 - Building a WPF Client</title><link>http://blogs.msdn.com/bethmassi/archive/2009/01/15/ado-net-data-services-building-a-wpf-client.aspx</link><description>In my last post I introduced ADO.NET Data Services and how you can easily expose your data model via RESTful services that support the basic CRUD (Create,Retrieve,Update,Delete) operations. Basic CRUD database operations map well to the familiar HTTP</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>ADO.NET Data Services - Building a WPF Client</title><link>http://blogs.msdn.com/bethmassi/archive/2009/01/15/ado-net-data-services-building-a-wpf-client.aspx#9334120</link><pubDate>Sat, 17 Jan 2009 07:01:01 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9334120</guid><dc:creator>DotNetShoutout</dc:creator><description>&lt;p&gt;Thank you for submitting this cool story - Trackback from DotNetShoutout&lt;/p&gt;
</description></item><item><title>re: ADO.NET Data Services - Building a WPF Client</title><link>http://blogs.msdn.com/bethmassi/archive/2009/01/15/ado-net-data-services-building-a-wpf-client.aspx#9339599</link><pubDate>Mon, 19 Jan 2009 10:05:22 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9339599</guid><dc:creator>Donald</dc:creator><description>&lt;p&gt;So can I work offline, save to a file like a dataset diffgram... then later reload the dataset diffgram and save changes back to the server?&lt;/p&gt;</description></item><item><title>re: ADO.NET Data Services - Building a WPF Client</title><link>http://blogs.msdn.com/bethmassi/archive/2009/01/15/ado-net-data-services-building-a-wpf-client.aspx#9339644</link><pubDate>Mon, 19 Jan 2009 10:53:13 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9339644</guid><dc:creator>Emmanuel Nuyttens</dc:creator><description>&lt;p&gt;Hi Beth,&lt;/p&gt;
&lt;p&gt;Nice example of using ADO.NET DataServices, but I have some doubts ... namely there's a lack of abstraction between the layers !&lt;/p&gt;
&lt;p&gt;Let me explain:&lt;/p&gt;
&lt;p&gt;In your code, you do the next:&lt;/p&gt;
&lt;p&gt;// Declaration&lt;/p&gt;
&lt;p&gt;Private DataServiceClient As New NorthwindEntities(New Uri(&amp;quot;&lt;a rel="nofollow" target="_new" href="http://localhost:1234/Northwind.svc&amp;quot;"&gt;http://localhost:1234/Northwind.svc&amp;quot;&lt;/a&gt;))&lt;/p&gt;
&lt;p&gt;// Direct use of the DataService, lack of abstraction !&lt;/p&gt;
&lt;p&gt;Me.CategoryLookup = (From c In Me.DataServiceClient.Categories _&lt;/p&gt;
&lt;p&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; Order By c.CategoryName).ToList()&lt;/p&gt;
&lt;p&gt;So the WinClient here is calling directly the DataAccesslayer.&lt;/p&gt;
&lt;p&gt;In former demos , you abstracted the DataLayer from the client by means of a wcf service. This service routed the client calls from and to the client.&lt;/p&gt;
&lt;p&gt;So, for example, we had a method in our DataAccesslayer called GetCustomers() which did the reald db-connection and executed the linq-query to return a bunch of customers.&lt;/p&gt;
&lt;p&gt;Then our Middle-Tier WCF service called this method (GetCustomers).&lt;/p&gt;
&lt;p&gt;finaly, in our WPF or WinClient, we only had a proxy to the WCF service, calling the GetCustomers() method from the service and retruning as List Of Customers.&lt;/p&gt;
&lt;p&gt;... Or did i miss something here ?&lt;/p&gt;
&lt;p&gt;Anyway, thanx for any response,&lt;/p&gt;
&lt;p&gt;Emmanuel Nuyttens,&lt;/p&gt;
&lt;p&gt;.NET Architect&lt;/p&gt;
&lt;p&gt;BERCO NV.&lt;/p&gt;</description></item><item><title>re: ADO.NET Data Services - Building a WPF Client</title><link>http://blogs.msdn.com/bethmassi/archive/2009/01/15/ado-net-data-services-building-a-wpf-client.aspx#9341003</link><pubDate>Tue, 20 Jan 2009 02:20:33 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9341003</guid><dc:creator>Beth Massi</dc:creator><description>&lt;p&gt;Hi Emmanuel,&lt;/p&gt;
&lt;p&gt;I wanted to make the sample as simple as possible so there is just one client project and one server project which includes the service and the database access via an entity data model. However you could of course split the entity data model into a separate project and reference it from the service. &lt;/p&gt;
&lt;p&gt;There is abstraction though. The proxy to the service (how you call it) is generated on the client when you add the service reference. This proxy contains a client-side representation of your entity types. These types do not necessarily map directly to your database tables, however in the example I did do it this way for simplicity. Having this proxy also means that you can write LINQ queries over these types and the client framework will send the requests to the service as HTTP GETs (because it is a RESTful service) over the wire for you when you access the results of the query. You can play around with this in Fiddler.&lt;/p&gt;
&lt;p&gt;The beauty with ADO.NET data services is that it's automatically setting up all the plumbing to query and update your data model remotely. However the entity types that are returned are not true business objects, they are just data objects (only properties no behavior). You can extend these but unfortunately you cannot type share them on the client and the server. In many cases you may need more complex business rules besides just simple validation and want to share common business types. In those cases it's better to create your own data contracts and return real business objects like I showed previously. &lt;/p&gt;
&lt;p&gt;HTH,&lt;/p&gt;
&lt;p&gt;-B&lt;/p&gt;
</description></item><item><title>ADO.NET Data Services - Enforcing FK Associations and a Fix for Deleting Entities</title><link>http://blogs.msdn.com/bethmassi/archive/2009/01/15/ado-net-data-services-building-a-wpf-client.aspx#9354287</link><pubDate>Wed, 21 Jan 2009 06:15:04 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9354287</guid><dc:creator>Beth Massi - Sharing the goodness that is VB</dc:creator><description>&lt;p&gt;Last post I described one way to build a smart client in WPF against ADO.NET Data Services. In this example&lt;/p&gt;
</description></item><item><title>ADO.NET Data Services - Intercepting Queries and Adding Validation</title><link>http://blogs.msdn.com/bethmassi/archive/2009/01/15/ado-net-data-services-building-a-wpf-client.aspx#9362892</link><pubDate>Thu, 22 Jan 2009 07:53:12 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9362892</guid><dc:creator>Beth Massi - Sharing the goodness that is VB</dc:creator><description>&lt;p&gt;Last few posts I've been building a WPF client against ADO.NET Data Services, if you missed them: Using&lt;/p&gt;
</description></item><item><title>ADO.NET Data Services - Intercepting Queries and Adding Validation</title><link>http://blogs.msdn.com/bethmassi/archive/2009/01/15/ado-net-data-services-building-a-wpf-client.aspx#9365148</link><pubDate>Thu, 22 Jan 2009 12:00:57 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9365148</guid><dc:creator>VB Feeds</dc:creator><description>&lt;p&gt;Last few posts I&amp;amp;#39;ve been building a WPF client against ADO.NET Data Services, if you missed them&lt;/p&gt;
</description></item><item><title>ADO.NET Data Services - Building an Excel Client</title><link>http://blogs.msdn.com/bethmassi/archive/2009/01/15/ado-net-data-services-building-a-wpf-client.aspx#9372253</link><pubDate>Fri, 23 Jan 2009 09:46:28 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9372253</guid><dc:creator>Beth Massi - Sharing the goodness that is VB</dc:creator><description>&lt;p&gt;Last few posts I've been building a WPF client against ADO.NET Data Services, if you missed them: Using&lt;/p&gt;
</description></item><item><title>ADO.NET Data Services - Building an Excel Client</title><link>http://blogs.msdn.com/bethmassi/archive/2009/01/15/ado-net-data-services-building-a-wpf-client.aspx#9372398</link><pubDate>Fri, 23 Jan 2009 12:32:47 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9372398</guid><dc:creator>VB Feeds</dc:creator><description>&lt;p&gt;Last few posts I&amp;amp;#39;ve been building a WPF client against ADO.NET Data Services, if you missed them&lt;/p&gt;
</description></item><item><title>re: ADO.NET Data Services - Building a WPF Client</title><link>http://blogs.msdn.com/bethmassi/archive/2009/01/15/ado-net-data-services-building-a-wpf-client.aspx#9555744</link><pubDate>Sun, 19 Apr 2009 18:58:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9555744</guid><dc:creator>coolduds</dc:creator><description>&lt;p&gt;Hey Beth,&lt;/p&gt;
&lt;p&gt;thanks for the example. &amp;nbsp;I've been having some problems with getting a WPF window to refresh when the underlying source data updates. &amp;nbsp;It just all goes blank.&lt;/p&gt;
&lt;p&gt;To check it out, I've created a WPF window, with a textbox in which I enter the key. &amp;nbsp;Click a button, and that fills a dataset with the one record corresponding to the key.&lt;/p&gt;
&lt;p&gt;Some other textboxes are bound to various fields in the record.&lt;/p&gt;
&lt;p&gt;The first time, when the form is first opened, it works fine.&lt;/p&gt;
&lt;p&gt;After that, the textboxes just go blank.&lt;/p&gt;
&lt;p&gt;To refresh I do:&lt;/p&gt;
&lt;p&gt;Me.DataContext=Nothing&lt;/p&gt;
&lt;p&gt;Me.DataContext=Me.dataset.table&lt;/p&gt;
&lt;p&gt;Any ideas on what is happening? &amp;nbsp;Have I give enough info? &amp;nbsp;thanks much. &amp;nbsp;jen.&lt;/p&gt;</description></item><item><title>re: ADO.NET Data Services - Building a WPF Client</title><link>http://blogs.msdn.com/bethmassi/archive/2009/01/15/ado-net-data-services-building-a-wpf-client.aspx#9555838</link><pubDate>Sun, 19 Apr 2009 21:59:01 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9555838</guid><dc:creator>coolduds</dc:creator><description>&lt;p&gt;Figured out my last question already - about refreshing the datacontext. &amp;nbsp;Turns out that once the dataset is updated, need to physically move to the first record even tho there is only one record in the dataset. &amp;nbsp;jen.&lt;/p&gt;</description></item></channel></rss>