public async Task <(string, string, byte[])> DownloadBlobAsync(Guid attachmentId) { var attachment = await _dbContext.Attachments.Where(e => e.Id == attachmentId).FirstOrDefaultAsync(); if (attachment != null) { var attachmentFileType = GetContainerFileType(attachment.Extension); var containerName = GetContainerName(AttachmentFileTypes.Images); var fileName = attachment.Id.ToString() + attachment.Extension; var contentType = GetMimeType(fileName); byte[] file = await _azureBlobService.DownLoadFileToByteArray(_appSetting.AzureBlobStorageConnectionString, containerName, fileName); return(fileName, contentType, file); } return(string.Empty, string.Empty, null); }