CodeSmith Community
Your Code. Your Way. Faster!

DataRepository dynamic connection string

Latest post 11-09-2007 6:49 AM by xas. 0 replies.
  • 11-09-2007 6:49 AM

    • xas
    • Not Ranked
    • Joined on 09-20-2007
    • Posts 5
    • Points 95

    DataRepository dynamic connection string

    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.

    • Post Points: 5
Page 1 of 1 (1 items) | RSS
Copyright © 2008 CodeSmith Tools, LLC
Powered by Community Server (Commercial Edition), by Telligent Systems