该项目是一个使用 Sqlite 的 xamarin 形式的测验应用程序,在代码中需要一种加载问题的方法,我将展示他们如何在 Azure 中执行此操作,我需要在 Sqlite 中做同样的事情。我还包含一个指向使用 Azure 的 xamarin 测验的源代码的链接。[1]:https ://github.com/garudaslap/xamarinquiz
public async Task LoadQuestions()
{
IsLoading = true;
MobileServiceClient client = AppSettings.MobileService;
IMobileServiceTable<XamarinQuiz> xamarinQuizTable =
client.GetTable<XamarinQuiz>();
try
{
QuestionList = await xamarinQuizTable.ToListAsync();
}
catch (Exception exc)
{
}
IsLoading = false;
ChooseNewQuestion();
}