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...

Advertisement
Free Agile Project Management Tool from Telerik
TeamPulse Community Edition helps your team effectively capture requirements, manage project plans, assign and track work, and most importantly, be continually connected with each other.
Category: Data | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 2330 | Hits: 277

Similar Posts

  • Migrating to Postgresql with my friend NHibernate more
  • An alternative to Crystal more
  • A Tool For Querying Multiple Databases more
  • Ruminations on Multi-Tenant Data Architectures more
  • NHibnerate : Handling the Special Cases more
  • NHibernate : Some Naked Thoughts more
  • ASP.NET MVC HttpModule Registration Under IIS Integrated Mode vs. Classic Mode more
  • Running the Same Query Against Multiple Databases more
  • Use this NHibernate wrapper to keep your repository classes simple more
  • NHibernate in Action more

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD