Reading connection string from external config file

前端 未结 4 744
一整个雨季
一整个雨季 2020-12-17 16:46

I have created a console application and an app.config file and Connections.config file. The app.config file has a connectionstring property source pointing to the Connectio

4条回答
  •  自闭症患者
    2020-12-17 17:08

    There is a nice article on MSDN: https://msdn.microsoft.com/en-us/library/ms254494(v=vs.110).aspx.

    Quote from the article:

    To store connection strings in an external configuration file, create a separate file that contains only the connectionStrings section. Do not include any additional elements, sections, or attributes. This example shows the syntax for an external configuration file.

    
      
    
    

    Hope this helps people who run into this question later.

提交回复
热议问题