public async Task <IEnumerable <CommentViewModel> > GetAllCommentsForPhoto(int photoId) { var commentRepo = new CommentController(_clientFactory); var allComents = await commentRepo.GetAllCommentsForPhoto(photoId); return(allComents.Select(c => new CommentViewModel() { Id = c.Id, Body = c.Body, Email = c.Email, Name = c.Name })); }