Reputation: 1685
I have implemented MVVM in my WPF application. I was wondering what is the correct way to consume a Web Service from WPF MVVM app.
So far, I have created a DataAccess interface and a class that implements this interface. This would serve as a facade / proxy to the web service. The ViewModel gets a reference to this class as the constructor parameter so it can make any calls to get/set data, in this case it will be a Web service call. I would appreciate if you can guide me with some hints and / or direct me to some online resource.
Upvotes: 2
Views: 2616
Reputation: 2421
I know about 3 different ways of writting asynchronous code for MVVM:
using coroutines:
using Rx "Reactive Extensions" (this the newest):
We aware that except the "classical" solution all the others use advanced techniques.
Upvotes: 3