asp.net core-6.Bind讀取配置文件到C#實例中

1,創建asp.net core web應用程序,選擇空網站 2,創建一個appsettings.json文件 爲什麼要叫appsettings.json呢?因爲在Iwebhost啓動的時候沒有添加任何配置和配置相關的!所以Iwebhost啓動時會默認把appsettings.json讀取到Configuration中去 3,創建類    在Startup.cs文件中
相關文章
相關標籤/搜索