Skip to content

Instantly share code, notes, and snippets.

@bjoerntx

bjoerntx/test.cs Secret

Created July 6, 2023 11:59
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/42a9e9e747e0e1456f10cb3cd9bc99ff to your computer and use it in GitHub Desktop.
Save bjoerntx/42a9e9e747e0e1456f10cb3cd9bc99ff to your computer and use it in GitHub Desktop.
[HttpGet]
public IActionResult ReplaceWord(string word) {
Dictionary<string, string> dict = new Dictionary<string, string>()
{
{ "Word1", "<strong>Formatted</strong> replacement for <em>Word1</em>" },
{ "Word2", "<strong>Formatted</strong> replacement for <em>Word2</em>" },
{ "Word3", "<strong>Formatted</strong> replacement for <em>Word3</em>" }
};
return dict.ContainsKey(word) ? Ok(dict[word]) : Ok(null);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment