New Posts New Posts RSS Feed: GlobalCache
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

GlobalCache

 Post Reply Post Reply
Author
gregweb View Drop Down
DevForce MVP
DevForce MVP
Avatar

Joined: 10-Sep-2009
Location: Clearwater, Fl
Posts: 253
Post Options Post Options   Quote gregweb Quote  Post ReplyReply Direct Link To This Post Topic: GlobalCache
    Posted: 01-Mar-2013 at 9:30am
OK, never mind. I was getting the default UOW instead of the one for the particular contact. In other words, the first line should be:

var unitOfWork = _unitOfWorkManager.Get(contactId);

Greg

Back to Top
gregweb View Drop Down
DevForce MVP
DevForce MVP
Avatar

Joined: 10-Sep-2009
Location: Clearwater, Fl
Posts: 253
Post Options Post Options   Quote gregweb Quote  Post ReplyReply Direct Link To This Post Posted: 01-Mar-2013 at 9:26am
In LoadDataAsync of ContactAddressListViewModel, there is this code:

               var unitOfWork = _unitOfWorkManager.Get(0);
               var states = await unitOfWork.States.AllAsync(q => q.OrderBy(s => s.Name));
               StateEntities = new BindableCollection<StateEntity>(states);

It runs, but states are always empty. But if I look in the debugger and expand out the UnitOfWork to the entity manager, it shows that the States are in fact there.

In the GlobalCache, the states are loading up:

EntityManager.StateEntities.ExecuteAsync()

So I am not sure what the deal is. If I try to get any of the other types from the GlobalCache, the result is the same - zero entities. Of course it works fine in TempHire :)
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down