public async IAsyncEnumerable <Category> GetCategoriesAsync() { string categoryPath = _pathService.GetCategoryFolder(); IEnumerable <FileContent> categories = await _githubService.GetAllFilesWithContentAsync(categoryPath) ?? new List <FileContent>(); foreach (FileContent file in categories) { yield return(JsonSerializer.Deserialize <Category>(file.Content)); } }