Azure Mobile App Offline Sync - URL length limitations, batched pulls, queryId length -
schematically, spend time doing things looking following.
public async task<itema> getitemsa(object someparams) { var res = new list<itema>(); var listofitemaids = await getidsfromserverasync(someparams); var tableaquery = _tablea.where(x => listofitemaids.contains(x.id)); await _tablea.pullasync(null, tableaquery); var itemsa= await tableaquery.tolistasync(); var listofitembids = itemsa.select(x => x.bid).tolist(); await _tableb.pullasync(null, _tableb.where(x => listofitembids .contains(x.id)); foreach(var itema in itemsa) { itema.itemb = await _tableb.lookupasync(itema.itembid); } return res; }
there several problems that:
listoftableaids.contains(x.id)
leads errors due url length limitations- as cannot represent content of
listofitemaids
orlistofitembids
queryid
of less 50 chars, end pulling data might have - it's shame pulls not batched single server call
- i directly need single server query wouldn't benefit azure mobile sync framework
any suggestions on how improve sequence?
i suggest refine things query simpler. may overall pull more data, data available within tableb. instance, may want "where itembid not null".
Comments
Post a Comment