public async Task <IActionResult> OnPostAsync() { if (!ModelState.IsValid) { return(Page()); } var productView = _pdfService.GetProductAsPdf(""); return(Page()); }
/// <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 = "*****@*****.**" }); }