Skip to content

Instantly share code, notes, and snippets.

@DeeJayTC
Created February 21, 2019 21:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DeeJayTC/ae96f0bd72fd5645a21659fc1c693e09 to your computer and use it in GitHub Desktop.
Save DeeJayTC/ae96f0bd72fd5645a21659fc1c693e09 to your computer and use it in GitHub Desktop.
public async Task<string> GetTemplate()
{
var status = new Status() {
Date = DateTime.Now,
User = new User() {
FirstName = NameGenerator.GenerateFirstName(Gender.Male),
LastName = NameGenerator.GenerateLastName()
}
};
var tpl = await System.IO.File.ReadAllTextAsync("./status.json");
var tplKey = "statusKey";
var payload = await _renderService.Render(tplKey, tpl, status);
return payload.Replace(System.Environment.NewLine, "").Replace(" ","");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment