Skip to content

Latest commit

 

History

History
17 lines (12 loc) · 1.14 KB

README.md

File metadata and controls

17 lines (12 loc) · 1.14 KB

RazorMachine

var rm = new RazorMachine();
var result = 
   rm.Execute("Hello @Model.FirstName @Model.LastName", new {FirstName="John", LastName="Smith"});
Console.WriteLine(result);

RazorMachine is a robust and easy to use .Net Razor 2 template engine. This implementation supports layouts (masterpages) and a _viewStart construct, just like MVC does support these features. The RazorEngine works independently from MVC. It only needs the System.Web.Razor reference. It almost works exacly like Asp.Net MVC. Take a look at the examples at the wiki to see how easy this framework works.

This RazorEngine originally was published at the CodeProject

Install

There is a package available at NuGet. To install RazorMachine using NuGet, run the following command in the Package Manager Console

PM> Install-Package RazorMachine