문제

I am newbie for template engines Just I am curious is it possible to use Razor without MVC ? I want to use a template engine in .NET. I have looked at the NVelocity but razor seems more understandable to me

도움이 되었습니까?

해결책

Well, not really. Razor view engine is built on top of ASP.Net but it doesn't depend on MVC framework.

You can use it in a console app if you wish.

Here's a good article demonstrating the use outside of MVC: http://buildstarted.com/2010/09/29/razor-view-engine-without-mvc-at-all/

and another one here from Andrew Nurse: http://vibrantcode.com/blog/2010/7/22/using-the-razor-parser-outside-of-aspnet.html

다른 팁

You can check out RazorEngine:

A templating engine built upon Microsoft's Razor parsing technology. The RazorEngine allows you to use Razor syntax to build robust templates

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top