sqllite xamarin.forms异步停止响应

问题描述 投票:0回答:1

我正在通过遵循本教程来尝试使用sql lite和Xamarin async

https://docs.microsoft.com/en-us/learn/modules/store-local-data-with-sqlite/6-exercise-use-sqlite-asynchronously

enter image description here

when I do this the whole app stops responding why ?

statusMessage.Text = "";
var people = App.PersonRepo.GetAllPeopleAsync();
peopleList.ItemsSource = people;

enter image description here

c# sqlite xamarin.forms
1个回答
1
投票

调用await方法时需要使用async

var people = await App.PersonRepo.GetAllPeopleAsync()
© www.soinside.com 2019 - 2024. All rights reserved.