.net core 使用 ConfigurationManager 读取config配置文件
1、dotnet core 默认不支持 ConfigurationManager ,需要单独应用。
nuget System.Configuration.ConfigurationManager
2、使用
ConfigurationManager.ConnectionStrings["xxxxx"].ConnectionString
ConfigurationManager.AppSettings["xxxx"]
参考:
https://docs.microsoft.com/zh-cn/ef/core/miscellaneous/connection-strings
定,精,简,俭

浙公网安备 33010602011771号