我想从app.config
文件中获取连接字符串。
connectionString = System.Configuration.ConfigurationSettings.AppSettings["DBEntities"];
但是它不起作用,它是空的。
因为它是.NET 4,所以我无法访问System.Configuration.ConfigurationManager
。
我该如何从app.config
获取我的连接字符串?
我想从app.config
文件中获取连接字符串。
connectionString = System.Configuration.ConfigurationSettings.AppSettings["DBEntities"];
但是它不起作用,它是空的。
因为它是.NET 4,所以我无法访问System.Configuration.ConfigurationManager
。
我该如何从app.config
获取我的连接字符串?