Jemayn
07/31/2023, 10:43 AMcsharp
public async Task<List<DataListItem>> GetItems(Dictionary<string, object> config)
{
var items = new List<DataListItem>();
var categories = await _productService.GetCategories();
foreach (var category in categories)
{
items.Add(new DataListItem
{
Name = category.Name,
Value = category.EntityId.ToString()
});
}
return items;
}
Jemayn
07/31/2023, 10:50 AMSebastiaan
07/31/2023, 11:21 AMvar categories = await _productService.GetCategories().Result;
will make it a regular sync call so you could pretend it was never async to begin with? 😅Jemayn
07/31/2023, 1:15 PM