Multitenant NHibernate application with with separate SQL Server schema for each tenant

Posted by Branko on Stack Overflow See other posts from Stack Overflow or by Branko
Published on 2010-12-31T09:11:31Z Indexed on 2010/12/31 18:54 UTC
Read the original article Hit count: 209

I am writing a new multi-tenant WCF RIA application. I plan to have a shared database with separate SQL Server schema for each tenant. I would like to use NHibernate for object-ralational mapping.

Configuration of SQL Server schema in mapping classes doesn't help because it is static and would need one set of mapping classes for each tenant.

Is it possible to dynamically configure ISession which SQL Server schema should be used for mapping objects to tables?

© Stack Overflow or respective owner

Related posts about sql-server

Related posts about nhibernate