Centralize connection strings for multiple projects within the same solution

后端 未结 3 1701
南笙
南笙 2020-12-08 22:13

I currently have three projects in my solution that all have their own App.config file with the same exact connection string.

Is there a way to consolidate the conne

3条回答
  •  孤城傲影
    2020-12-08 22:57

    First, take a look at this post. It describes how you can share the same app.config between multiple projects.

    How to Share App.config?

    Second, take a look at one other post, which describes how you let different app.config-files have a reference to one single shared xml-file which contains the connection strings.

    Use XML includes or config references in app.config to include other config files' settings

提交回复
热议问题