How to load appsetting.json section into Dictionary in .NET Core?

后端 未结 10 1488
误落风尘
误落风尘 2020-12-05 16:49

I am familiar w/ loading an appsettings.json section into a strongly typed object in .NET Core startup.cs. For example:

public class CustomSection 
{
   publ         


        
10条回答
  •  既然无缘
    2020-12-05 17:47

    I believe you can use the following code:

    var config =  Configuration.GetSection("MobileConfigInfo").Get>(); 
    

提交回复
热议问题