예제 #1
0
        public async Task <IActionResult> OnPostAsync()
        {
            if (!ModelState.IsValid)
            {
                return(Page());
            }

            var productView = _pdfService.GetProductAsPdf("");

            return(Page());
        }
예제 #2
0
        /// <summary>
        /// todo - ???? what is this?
        /// </summary>
        public async void SendProductPDF()
        {
            var product = new GetProduct(_context, _discounts);
            var result  = await _viewRenderService.RenderToStringAsync("/Pages/Shop/Product.cshtml", product);

            var file = await _pdfService.GetProductAsPdf(result);

            _emailSender.SendProductPDF(new EmailSender.Request {
                EmailAddress = "*****@*****.**"
            });
        }