예제 #1
0
        public async Task <ImmutableList <KeyValueModel> > GetCategories()
        {
            var response = await _client.GetCategoriesAsync();

            return(response.Data.Categories
                   .Select(x => new KeyValueModel {
                Key = x.Id.ToString(), Value = x.Name
            })
                   .ToImmutableList());
        }