Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Created November 23, 2023 14:02
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 bjoerntx/8329a3c08b2a013ddff09b56778602ac to your computer and use it in GitHub Desktop.
Save bjoerntx/8329a3c08b2a013ddff09b56778602ac to your computer and use it in GitHub Desktop.
public IActionResult Editor(string id = null)
{
EditorViewModel model = new EditorViewModel()
{
InvoiceData = InvoiceData.GetDummyInvoiceData(),
DocumentId = id
};
if (id != null)
{
// url encoded
id = id.Replace("%2F", "/");
model.TemplateData = Storage.GetTemplate(id);
}
return View(model);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment