コード例 #1
0
        public async Task <IActionResult> CreateInvoiceDocumentAsync(int id)
        {
            await _documentGenerationManager.CreateAndStoreInvoiceDocumentAsync(id);

            // TODO return download location in Location header
            return(NoContent());
        }
コード例 #2
0
        public async Task <IActionResult> CreateInvoiceDocumentAsync(int id, [FromQuery] string language)
        {
            var fileStream = await _documentGenerationManager.CreateAndStoreInvoiceDocumentAsync(id, language);

            var file = new FileStreamResult(fileStream, "application/pdf");

            file.FileDownloadName = fileStream.Name;
            return(file);
        }