public async Task <List <PhotoDTO> > GetPhotosByAlbumId(int albumId) { var response = await _albumsInterface.GetPhotosByAlbumId(albumId); var photos = response.Select(x => new PhotoDTO { Id = x.Id, ThumbnailUrl = x.ThumbnailUrl, Title = x.Title, Comments = x.Comments.Select(y => new CommentDTO { Id = y.Id, Body = y.Body, Name = y.Name }).ToList() }).ToList(); return(photos); }
public Album GetPhotosByAlbumId(int albumId) { return(_repository.GetPhotosByAlbumId(albumId)); }