Example #1
0
        public FileStreamResult Generate(PortfolioModel portfolioModel)
        {
            var portfolio          = Mapper.Map <PortfolioDto>(portfolioModel);
            var generatedPortfolio = _portfolioService.Calculate(portfolio);
            var pdf = _portfolioService.GeneratePdf(generatedPortfolio);

            return(new FileStreamResult(pdf, "application/pdf"));
        }