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