Verify yourself to prove that you are not a ROBOT! After verification the page will apear. Thanks for understanding.
|Added at||2017-12-28 16:12|
Thanks to this helpful blog post I have worked out how to create an AppSettings class and populate it. This post also covers using dependency injection to access AppSettings from a RazorPage model.
My appsettings.json file
Automatically bind my AppSettings class in Startup.cs
Accessing the settings via dependency injection:
This works but ideally I don't want to have to configure every page to use this dependency injection and expose my
I have thought about using a BaseViewModel from which all my page's models are inherited but experimenting with this hasn't resulted in anything useful (just a exceptions).