private async Task LoadAllPeople(string caller, Action callBack) { var allResult = await SqliteDb.GetAll <Person>(); if (allResult.Error == null) { People = allResult.Response.ToObservable <Person>(); callBack?.Invoke(); } else { DialogPrompt.ShowMessage(new Prompt() { Title = "Error", Message = allResult.Error.Message }); } }
public override void OnInit() { Task.Run(async() => { var results = await SqliteDb.GetAll <Person>(); if (results.Success) { People = results.Response.ToObservable(); } else { DialogPrompt.ShowMessage(new Prompt() { Title = "Error", Message = results.Error.Message, ButtonTitles = new string[] { "Okay" } }); } }); }