Пример #1
0
        public async Task <PhotoDTO> GetPhotoById(int photoId)
        {
            var response = await _albumsInterface.GetPhotoById(photoId);

            var comments = await _commentsService.GetCommentsByPhotoId(photoId);

            PhotoDTO photo = new PhotoDTO()
            {
                Id       = response.Id,
                Title    = response.Title,
                Url      = response.Url,
                Comments = comments ?? comments
            };

            return(photo);
        }