Use Razor components to create email template in .NET 8 console app

Опубликовано: 15 Октябрь 2024
на канале: Authorised Territory
1,091
15

Authorised Territory code examples - This .NET 8 C# tutorial shows how to render Razor components outside of the ASP.NET Core hosting environment.
First, we create Razor components that represent an email template.
Next, in the console app we loop through dummy data and render the Razor component.
Finally, we save the html contents to a file and display the email in the browser.