C# .NET Core-Configuration簡介與Options Pattern使用

Development、Production、Staging 皆是微軟內建的值
  1. 於 appsettings.json 中新增 Section
名稱需與appsettings.json中的key相同
ConfigureService 會用於註冊服務、Configure用於註冊middleware居多
參數式帶入的時候要使用到IOptions介面

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store