I have some questions and thoughts about how to use NHibernate efficient in a multi tenancy environment. If we look at our business rules we have thousands of customers that will run our system. We are hosting it all Our system is an economy system and each customer has its own data. But in some cases there are other companies that handles several of our customer data and we want them to be able to login and have access to all these customer data. I have seen some solutions on multi tenancy solutions. What I can see there are three. Multiple databases (one per customer) One database with views that has a tenancy id which will make the database transparent and in the application make the database seem like there are only one customer. One database with all data, Solve what the customer shall see or not se with Ids in every criteria or linq query What is the best choice for me? If I use multiple databases which are my favorite right now, we will have thousands of databases in our SQL environment; can it be hard to manage? In some cases we will have one user that can manage several companies, I’m not sure they need to manage them at once, so it maybe can be solved in an easy way. How shall we solve the sessionfactory problem? The mapping and all settings will be the same for all customers but the connection string will differ per customer so, can I make an sessionfactory where I can make sessionFactory.OpenSession (connectionstring) kind of thing? Or are there some problems with a solution like that? The sessionfactory will in this case live in an wcf service and an web application. Views, are there any tips I need to know about? Any problems with NHibernate working with views? Same problem here with the sessionfactory, how can I change the connection string per session? I don’t even want to think about the third solution
-- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=.
