I've followed all the steps described in this tutorial (for Xamarin Android) but after I query the toDoTable like this
var items = await toDoTable.Where(x => x.Complete == false).ToListAsync();
at the end of OnCreate() I can't acces the data stored to the cloud, only the data that I added before on the local database. The
await client.SyncContext.PushAsync();
works just fine because I can see in the cloud the data I've added through my app but the
await toDoTable.PullAsync("allTodoItems", toDoTable.CreateQuery());
doesn't seem to work.
Any ideas, please?
The problem was not the toDoTable.PullAsync command, but the way I inserted data on the table and expected to retrieve it. I was using the mobile-service website and didn't let the table auto-generate data for auto-generated columns
{
"id_user": 1,
"username": "sample string 2",
"password": "sample string 3",
"is_doctor": 4,
"id": "sample string 5",
"__version": "QEBA",
"__createdAt": "2015-06-06T08:21:37.329Z",
"__updatedAt": "2015-06-06T08:21:37.329Z",
"__deleted": true
}
and was inserting the data above. As soon as I made another insert (the one below) and let these columns be automatically generated I was able to retrieve the data from my table.
{
"id_user": 1,
"username": "sample string 2",
"password": "sample string 3",
"is_doctor": 4,
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.