Wednesday, September 22, 2010

Spring.NET NHibernate Dynamic ConnectionString

Configuration cfg = new
Configuration().Configure("hibernate.cfg.xml");
cfg.SetProperty("connection.connection_string", "Data
Source=MI_BASE;User ID=ID_USUARIO; Password=PASS_USUARIO");



References
[1] The Spring.NET Framework
http://www.springframework.net/doc-latest/reference/html/index.html
[2] http://gist.github.com/432083 (src-best)
[3] Changing your connection string at runtime with Spring.Net (src)
http://blog.bennymichielsen.be/2009/03/24/changing-your-connection-string-at-runtime-with-spring-net/

[4]How to change a connection string at runtime? (src)
http://forum.springframework.net/showthread.php?t=3390&page=3

[5] Authentication, Impersonation, and Dynamic NHibernate Connection Strings
http://jasondentler.com/blog/2009/11/authentication-impersonation-and-dynamic-nhibernate-connection-strings/
[6] Setting and retrieving the database connectionstring in nHibernate
http://codebetter.com/blogs/peter.van.ooijen/archive/2008/03/07/setting-and-retrieving-the-database-connectionstring-in-nhibernate.aspx

No comments:

Running apps

Runtastic (I uninstalled because force to update your device - Internet connection problems) Runkeeper  (Currently testing) Runna (Complex,...