- Add nuget package (currently on myget https://www.myget.org/F/bridge-razor/api/v2 )
- Create .cshtml file
Document.Body.AppendChild(RazorEngine.RenderDefaultView("/Views/SimpleView.cshtml", new SimpleViewModel()
{
Foo = "bar"
}));
or use partial view like here:
Your .cshtml files get transpiled to .cs before Bridge.Net does its magic. You can find intermediate files in bin/$(Configuration)/Bridge.Razor