WPF and WCF Data Services with SimpleMVVM

Dec 28, 2011 at 3:29 AM

I am embarking on a new project and have decided to use WPF with WCF Data Services (Astoria). I'd like to use SimpleMVVM, but do not see any discussion in the archives relating to this.  Are you aware of any unexpected issues that I may have to face? Any advice?

Thank you

Dec 28, 2011 at 2:49 PM

WPF and WCF Data Services is a great combination and is fully supported by Simple MVVM Toolkit.  I have blogged on WCF Data Services (blog.tonysneed.com), and there are lots of how-to videos out there as well.  WCF RIA Services is similar, in that it offers change-tracking and ad-hoc queries, and the like.  You will need to reference WCF Data Services in your client WPF app, then there is an API to invoke the service.  If you don't like the idea of ad-hoc queries, you can prohibit that and instead expose service operations.  Eiher way, the data access layer is abstracted from the ViewModels with a Service Agent that is responsible for invoking the service to get the data.  Everything else is pretty much the same.  Changes are tracked automatically on the client, so all you have to do is call SaveChanges on the client context.



Dec 28, 2011 at 6:29 PM

I downloaded slides and code, reviewed and ran the code already. I appreciate this very much. I am a fan.

Thank you

Burton Roberts


Feb 3, 2012 at 4:52 PM

Do you have example for MVVM for WPF and WCF Data Services? Please provide me a link to down load

Feb 6, 2012 at 2:36 AM
I don't have a specific example of using the toolkit with WPF and WCF Data Services, but you can check my blog for info on Data Services and then follow the example for SOAP Services.

May 9, 2012 at 5:38 PM

bhroberts52 or davidle1234,

Do either of you have any example code for using MVVM with WPF and getting data from a WCF Data Service?  I would appreciate it.