简体   繁体   中英

sqllite xamarin.forms async stops responding

I am trying to do async with sql lite and Xamarin by following this tutorial

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

在此处输入图片说明

when I do this the whole app stops responding why ?

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

在此处输入图片说明

调用async方法时需要使用await

var people = await App.PersonRepo.GetAllPeopleAsync()

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM