Skip to content

Instantly share code, notes, and snippets.

@justinyoo
Created January 25, 2017 05:44
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 justinyoo/09ff8cb65f1ad10ccec5d37979774fc2 to your computer and use it in GitHub Desktop.
Save justinyoo/09ff8cb65f1ad10ccec5d37979774fc2 to your computer and use it in GitHub Desktop.
Adding YAML Settings into ASP.NET Core Apps
public class ValuesController : Controller
{
private readonly AzureAdSettings _settings;
public ValuesController(AzureAdSettings settings)
{
this._settings = settings;
}
[HttpGet]
public IEnumerable<string> Get()
{
return new string[] { "value1", "value2", this._settings.ClientId };
}
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment