コード例 #1
0
        private async Task <string> GetBusinessLicenceDownloadLink(int siteId)
        {
            var businessLicenceDoc = await _siteService.GetLatestBusinessLicenceAsync(siteId);

            var documentAccessToken = await _documentAccessTokenService.CreateDocumentAccessTokenAsync(businessLicenceDoc.DocumentGuid);

            return(documentAccessToken.DownloadUrl);
        }
コード例 #2
0
        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);
        }