In ASP.NET MVC I could parse Razor scripts like this:
string template = "It is @DateTime.Now.ToString()";
string result = Razor.Parse(template);
But this static doesn't exist in core.
Also I've read this post, but in my case the view code is a string, so I can't use the find
or get
view methods from the ICompositeViewEngine
.
Any advice on how to get a view string parsed in core?