IRazorEngine razorEngine = new RazorEngine();
IRazorEngineCompiledTemplate template = razorEngine.Compile("Hello @Model.Name");
string result = template.Run(new
{
Name = "Alexander"
});
catch error:type can't be null
in System.Activator.CreateInstance(Type type, Boolean nonPublic)
in System.Activator.CreateInstance(Type type)
in RazorEngineCore.RazorEngineCompiledTemplate`1.<RunAsync>d__12.MoveNext()
in System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
in System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
in RazorEngineCore.RazorEngineCompiledTemplate`1.Run(Action`1 initializer)
catch error:type can't be null