1

我正在处理 Windows Phone 8 的 Azure 示例,但我的列表返回空:

var items = App.MobileService.GetTable<MyItem>().ToCollectionView();

但我完全能够插入一行

await App.MobileService.GetTable<MyItem>().InsertAsync(newMyItem);

在网络管理器中查看表格,我看到我正在填充列表。

有人知道吗?

4

1 回答 1

0

我的猜测是调用“ToCollectionView”是异步的,并且在您检查它时尚未收到该值。尝试改用“ReadAsync”方法:

var items = await App.MobileService.GetTable<MyItem>().ReadAsync();
于 2013-03-11T16:43:34.303 回答