GetItemsAsync returns no items using .Net MAUI

213 views Asked by At

I have migrated some code from the old Azure Mobile Client to DataSync, and the GetItemsAsync method is returning 0 items, although there are items in the database.

Here is the code snippet public async Task<IEnumerable<Configuration>> GetItemsAsync() { await InitializeAsync(); return await _table.GetAsyncItems().ToListAsync(); }

If I execute the exact same command through the web portal the correct result is returned.

I am expecting the GetAsyncItems to return a list of items (as it did previous using the Mobile Service Client package).

The call returns a list of 0 items.

If I examine the http traffic, the correct request is sent to Azure and the correct response is returned.

1

There are 1 answers

3
Adrian Hall On

Based on your final comment, you are using the client that uses the v3.0.0 ZUMO-API-VERSION and you are using the v2.0.0 ZUMO-API-VERSION backend. I'm surprised it is working at all.

When thinking about the ZUMO-API-VERSION

2.0.0 client works with either a 2.0.0 or 3.0.0 server. 3.0.0 client ONLY works with a 3.0.0 server.

So you can update the server, then update the clients, but not the other way round.