Question

I have a Razor template which I want to format with a model (a custom DTO) to return a string. I'm doing this from WPF, so I don't have an HttpContext. So far, the closest I've come is https://github.com/smsohan/MvcMailer/wiki/MvcMailer-Step-by-Step-Guide but when I call Execute(), I just get the name of the template file.

I'm sure this is possible but I can't get the syntax right.

Was it helpful?

Solution

I ended up using Spark, and wrote a quick blog post - Templating with Spark and WPF.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top