Guest User

Untitled

a guest
Dec 11th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. public async Task<IJsonValue> GetTableItems(string tableName, string masterKey, bool disableServerSideScripts)
  2. {
  3. // Get mobile service client with the admin filter.
  4. MobileServiceClient adminMobileService = App.MobileService.WithFilter(new AdminServiceFilter(disableServerSideScripts, masterKey));
  5.  
  6. // Get the selected mobile service table.
  7. IMobileServiceTable mobileServiceTable = this.adminMobileService.GetTable(tableName);
  8.  
  9. // Read the first 10 items in this table,
  10. // With disableServerSideScripts=true it's the actual first 10 rows otherwise it depends on the server side script.
  11. return await mobileServiceTable.ReadAsync("$top=10");
  12. }
Add Comment
Please, Sign In to add comment