I have a web project that uses a custom configuration class to store app settings in web.config. I do this to be able to store and access configuration settings in web.config that are based on server name. That way when the project moves from development, to staging, to production, I don't have to remember to change the web.config settings like connection string and other settings that may be different from server to server. The classes will retrieve the correct config settings from web.config based on the server it is deployed on.
This works rather well. However, now I converted the project to use Linq using the generated dbml classes. This is great, but the generated classes insist on using a simply connection string from web.config. Since these classes are automatically generated, I cannot simply change the code to use my custom config classes. Can someone explain how it would be possible to have the generated classes call my custom object to retrieve the proper connection string?
Thanks!