I am trying to use a .cshtml
template to send an email with RazorEngine. The documentation on their site shows how to use it with a string containing the razor syntax. How would I go about using it by loading a .cshtml
file instead?
This is what I have
string templatePath = "~/Templates/InitialApplicationBody.cshtml";
var result = Engine.Razor.RunCompile(templatePath, "templateKey", null, viewModel);