I am trying to integrate your different examples into a clean test case, and I am just getting lost. What I am trying to do is a simple MVVM Light application with a Repository that can properly support both single record and paged radgrid views.
I am afraid without an example to look at, I am not going to be able to even get started.
I tried to lift the code form your example of a paged view, and put it into the viewmodel, and got stuck on the DataContext which does not exist in the current context.
I eliminated the problem of referencing the _dataPager.PageSize from the view in the viewmodel, by using a public variable in the viewmodel instead, that the view can bind to.
But I have no idea what to do instead of DataContext, or how to get it to work if it should be in the viewmodel.
I also think most of this code should really be in the repository, but that is confusing me even more.
So please someone show me an example of either a viewmodel that supports paged data access with caching, or a repository linked to a viewmodel and view to do the same.
Thanks.