public async Task <IActionResult> GetPhotoFile(Guid id) { var photoContent = await photosRepository.GetPhotoContentAsync(id); if (photoContent == null) { return(NotFound()); } return(File(photoContent.Content, photoContent.ContentType, photoContent.FileName)); }