I am trying to parse my .cshtml view using RazorEngine in separate library project without ASP or MVC like following:
string result = Engine.Razor.RunCompile(pathTofile, "template2", null, model);
My template looks like that:
@using TemplateEngine.Helpers;
@model TemplateEngine.ViewModels.BaseComponentViewModel
<table>
@Model.Elements.GetElementValue("value")
</table>
But unfortunately i get an error that it cannot recognize GetElementValue(which is a separate method thats why I import Helpers)
Do you have any suggestions what i might doing wrong?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…