public async Task <IActionResult> Get(string photoId) { var photo = await _photoRepository.GetPhotoAsync(photoId); if (photo == null) { _logger.LogWarning($"Photo with photoId={photoId} was not found."); return(NotFound()); } photo.Albums = await _albumRepository.GetAlbumsAsync(photoId); _logger.LogInformation($"Photo with photoId={photoId} was successfully received."); return(Ok(photo)); }