Is there a way to process an MVC view (aspx file) from a non-web application?

后端 未结 5 1293
执念已碎
执念已碎 2020-12-14 23:55

I have a background service running which sends out emails to users of my website. I would like to write the email templates as MVC views, to keep things consistent (so tha

5条回答
  •  情深已故
    2020-12-15 00:44

    In a word, no -- ASP.NET view rendering is married to the web response cycle. Probably was quite necessary to get reasonable performance in the old days.

    Now, some other options exist, including the new razor view engine from Microsoft or the open-source Spark View Engine.

提交回复
热议问题