I have below razor string in my project as given below.
string razorString = "This mail is from @Model.email";
var model = new { email = "mann@gmail.com" };
I need to parse razorString with given model. I have seen Razor.Parse method in RazorEngine but that method is obsolete now and replaced with Engine.Razor. So how can i achieve same with new method. Please suggest.
After using Engine.Razor.RunCompile(template, "templateKey", null, model) i got below error
string template = "This mail is from @Model.email";
var model = new { email = "mann@gmail.com" };
string result = Engine.Razor.RunCompile(template, "templateKey", null, model);