How to vary connection string for different work locations

后端 未结 7 2034
情话喂你
情话喂你 2021-02-10 15:55

I am working on a C# 4.0, WPF 4.0, SQL 2008 project and I do work at home and in the office. I just setup SubVersion using Visual SVN per the recommendations found in other ques

7条回答
  •  南笙
    南笙 (楼主)
    2021-02-10 16:16

    Simple: Don't put the connection string in code, read it from configuration data somewhere. And then just don't put that configuration data in Subversion.

    In an app that I'm working on now, we store connection string information in the Windows registry, in HKLM\Software\[OurProduct]\Database.

提交回复
热议问题