Connection string hell in .NET / LINQ-SQL / ASP.NET

后端 未结 13 1131
渐次进展
渐次进展 2021-01-30 14:29

I have a web application that comprises the following:

  • A web project (with a web.config file containing a connection string - but no data access code in the web pr
13条回答
  •  孤独总比滥情好
    2021-01-30 14:53

    You could also have the web application provide the connection string when it needs to use the Data Access project. You could make it part of the constructor.

    Also, you could could just write your own logic to load a connection string from an external file when the data access project makes it's calls.

提交回复
热议问题