I have a DB connection string stored in web.config. I am creating a common library that requires the connection string. I could pass it in
Utility utilityToConnectToDb = new Utility("conString");
But, I have classes in the Library that call Utility. So I'll also need to give them knowledge of the connection string. This seems sloppy.
I am considering adding an XML file to the library and storing the connection string in this file.
Any better ideas or generally well accepted ways to solve this problem?