async Task LoadDataAsync() { List <CheckList> checklits = await _checkListService.GetCheckLists(); checklits.GroupBy(c => c.Title[0]) .ToDictionary(x => x.Key, x => x.ToList()) .OrderBy(x => x.Key) .Select(x => new CheckListHeaderGroup(x.Value, x.Key.ToString())) .ForEach(x => Items.Add(x)); }
public IActionResult CheckLists() { try { return(Ok(_checkListService.GetCheckLists())); } catch (Exception ex) { return(BadRequest(ex.Message)); } }