Created
February 21, 2019 16:07
-
-
Save DeeJayTC/4c28ecffa907483e95e76113f53d9bc4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//the underlying CardRenderService | |
public class CardRenderService | |
{ | |
private RazorLightEngine Engine; | |
public CardRenderService() | |
{ | |
Engine = new RazorLightEngineBuilder().UseMemoryCachingProvider().Build(); | |
} | |
public async Task<string> RenderCard(string key, string input, object data) | |
{ | |
return await Engine.CompileRenderAsync(key, input, data); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment