c# - How do I return all rows from Azure mobile Service Get Request? -
so have azure mobile web service
returns rows database.
but doesn't return rows , seems capped.
from this page read quote:
paging considerations .net backend mobile service
to override 50 row limit in .net backend mobile service, must apply enablequeryattribute public method , specify paging behavior. when applied method, following sets maximum returned rows 1000:
[enablequery(maxtop=1000)]
this , returns 1000 instead of default 50.
is there way return rows rather set number using enablequeryattribute?
if set property in attribute int.maxvalue
(i.e., [enablequery(maxtop = int.maxvalue)]`, you'll behavior want.
another way not return iqueryable
, maxtop
behavior applied, return ilist
instead (but you'll lose other iqueryable
features, such filtering):
public ilist<todoitem> getalltodoitems() { return query().tolist(); }
notice should aware of memory implications of returning large number of items. i'm not sure, it's possible entire response buffered before it's returned client (you should test that), , if return large number of elements, may run performance issues in server.
Comments
Post a Comment