Domanda

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.

È stato utile?

Soluzione

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

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top