문제

I am really new to MVVM and especially to the MVVM Light Toolkit. I try to make a little Windows Phone app, that uses the Buddy SDK (their Website). Where is the right place to handle all the api calls? Where should I store the User object, which is needed for every call?

Is it useful to create a Interface?

Michael

도움이 되었습니까?

해결책

I will put the API calls in a service (class + interface) and consume that service in your viewmodel. You can store the user object in a static class to be able to access to it in every call. Also if you don't need to query the user every time, when you get it from the server the first time, you can store it in isolated storage and in next execution, look for it and load the data in the static class.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top