Using NHibernate with multiple databases
Posted by: Karl Seguin [MVP],
on 30 Mar 2009 |
View original | Bookmarked: 0 time(s)
I've been asked a couple of times about hooking up NHibernate with multiple databases. You may need to do so for sharding purposes or as a business function. For example, we allow customers to deploy multiple databases for verification and/or training purposes in isolation from their main production database. This is quite easy to accomplish using NHibernate, but not readily documented. Let's look at the basic code we must implement. (Before we get started, you may want to opt for a more...