Hi. I've looked all over and I can't figure out why my viewmodel doesn't get populated.
I have this code:
_followersRepo = new NotesDomainContext();
_followersRepo.Load(_followersRepo.GetFollowersQuery(), lo => {
_followers = new ObservableCollection(_followersRepo.aspnet_Users);
}, null);
_followingRepo = new NotesDomainContext();
_followingRepo.Load(_followingRepo.GetUsersFollowedByIDQuery(CurrentUserId), lo => {
_following = new ObservableCollection(_followingRepo.aspnet_Users);
}, null);
_fullUserRepo = new NotesDomainContext();
_fullUserRepo.Load(_fullUserRepo.GetFullUserByIDQuery(CurrentUserId), lo => {
_currentUser = _fullUserRepo.FullUsers.SingleOrDefault();
}, null);
But when I debug, there is no data loaded to the Followers, Following and CurrentUser objects. I know that data should be returned because I'm trying to implement the MVVM pattern in my app, and haven't changed the domainservice. Also I can se debugging the CurrentUserId has a value. None of the variables have a value though, and the repo's don't have any either.
When I try to view the value of i.e. _followersRepo.aspnet_Users i just get "enumeration yielded no results" what's up with that?
There must be some key logic about domainservice querying that I'm really not getting, so I would appreciate it very much if someone would open my eyes