Castle Windsor config pointing to connectionStrings section in web.config

Posted by Georgia Brown on Stack Overflow See other posts from Stack Overflow or by Georgia Brown
Published on 2010-04-07T09:28:41Z Indexed on 2010/04/07 9:33 UTC
Read the original article Hit count: 364

I want to inject a connection string into my repository but ideally, I want this connection string to be in my web.config connectionStrings section rather than in my windsor config. Is this possible?

I know I can use the fluent interface and achieve this easily but my bosses want an xml config file.

I also know that I can define a property and use that in my windsor config to pass the parameter in, but I have other code that reads the connectionstring from the web.config directly and do not really want two places with the same connectionString.

© Stack Overflow or respective owner

Related posts about castle-windsor

Related posts about connection-string