//get an observablecollection list of learn objects private async Task GetDataAsync(string id) { var learnServices = new LearnServices(); var list = await learnServices.GetLearn(id); LearnOC = new ObservableCollection <Learn>(list); }
//get a list of learn objects private async Task GetDataAsyncByWord(string keyword, string type) { var learnServices = new LearnServices(); var message = await learnServices.GetLearnByNameExactBool(keyword, type); if (message) { //-->if learn existed var learn = await learnServices.GetLearnByNameExact(keyword, type); LearnList.Add(learn); } }