public async Task <Either <ActionResult, IEnumerable <Footnote> > > GetFootnotes(Guid releaseId) { return(await _contentPersistenceHelper .CheckEntityExists <Release>(releaseId) .OnSuccess(_userService.CheckCanViewRelease) .OnSuccess(_ => _footnoteRepository.GetFootnotes(releaseId))); }
private List <FootnoteViewModel> GetFootnotes(Guid releaseId, Guid subjectId) { return(_footnoteRepository.GetFootnotes(releaseId, subjectId) .Select(footnote => new FootnoteViewModel(footnote.Id, footnote.Content)) .ToList()); }