Exemplo n.º 1
0
        public async Task <IActionResult> CreateOfferDocumentAsync(int id)
        {
            await _documentGenerationManager.CreateAndStoreOfferDocumentAsync(id);

            // TODO return download location in Location header
            return(NoContent());
        }
Exemplo n.º 2
0
        public async Task <IActionResult> CreateOfferDocumentAsync(int id)
        {
            var fileStream = await _documentGenerationManager.CreateAndStoreOfferDocumentAsync(id);

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

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