public async Task <string> ParseAsync <T>(string template, T model, bool isHtml = true) { var project = new InMemoryRazorLightProject(); var engine = new RazorLightEngineBuilder().UseProject(project).Build(); return(await engine.CompileRenderStringAsync <T>(Guid.NewGuid().ToString(), template, model)); }
public async Task <string> ParseAsync <T>(string template, T model, bool isHtml = true) { var project = new InMemoryRazorLightProject(); var engine = new EngineFactory().Create(project); return(await engine.CompileRenderAsync <T>(Guid.NewGuid().ToString(), template, model)); }