private async Task <string> GetBusinessLicenceDownloadLink(int siteId) { var businessLicenceDoc = await _siteService.GetLatestBusinessLicenceAsync(siteId); var documentAccessToken = await _documentAccessTokenService.CreateDocumentAccessTokenAsync(businessLicenceDoc.DocumentGuid); return(documentAccessToken.DownloadUrl); }
public async Task <string> GetBusinessLicenceDownloadLink(int siteId) { var document = await _context.BusinessLicenceDocuments .SingleOrDefaultAsync(doc => doc.BusinessLicence.SiteId == siteId); if (document == null) { return(null); } var documentAccessToken = await _documentAccessTokenService.CreateDocumentAccessTokenAsync(document.DocumentGuid); return(documentAccessToken.DownloadUrl); }