private async Task <IReadOnlyCollection <PublicationViewModel> > GetTopPublications() { var publications = await _publicationService.GetTopPublications(); var categories = await _publicationService.GetCategories(); return(publications .Select(o => new PublicationViewModel(o, _settings.WebSiteUrl, categories)) .ToImmutableList()); }
public async Task <IReadOnlyCollection <Category> > GetCategories() { return(_categories ??= await _publicationService.GetCategories()); }
public Task <IReadOnlyCollection <Category> > GetCategories() => _publicationService.GetCategories();