Hello,
I'm working with dinamic connection strings and I have done it correctly in the Service Layer using this sentences:
MyProject.Service.ConnectionScope.Current.ConnectionStringKey = "DinnamicConnectionStringKey";
MyProject.Service.ConnectionScope.Current.DynamicConnectionString = newConnectionString;
Now I wanna do the same with the DataRepository but i don't how can I do it.
I tried this:
DataRepository.ConnectionStrings[Provider].ConnectionString = newConnectionString;
and this:
DataRepository.AddConnection(provider, newConnectionString);
but both don't work, the first one can't write the property and the second one changes the connection string but the providers still have the old.
I've looked into the forums:
http://community.codesmithtools.com/forums/p/2638/10825.aspx
http://community.codesmithtools.com/forums/p/2932/12166.aspx#12166
They tell how to add connection strings but .. when I call DataRepository my application is still using the old connection strings.
Any help will be appreciated.