Multi tenancy with Unity

Posted by Savvas Sopiadis on Stack Overflow See other posts from Stack Overflow or by Savvas Sopiadis
Published on 2010-03-08T07:29:52Z Indexed on 2010/03/08 7:36 UTC
Read the original article Hit count: 539

Filed under:
|
|
|

Hi everybody!

I'm trying to implement this scenario using Unity and i can't figure out how this could be done:

the same web application (ASP.NET MVC) should be made accessible to more than one client (multi-tenant). The URL of the web site will differentiate the client (this i know how to get).

So getting the URL one could set the (let's call it) IConnectionStringProvider parameter (which will be afterward injected into IRepository and so on). Through which mechanism (using Unity) do i set the IConnectionStringProvider parameter at run time?

I have done this in the past using Windsor & IHandlerSelector (see this) but it's my first attempt using Unity.

Any help is deeply appreciated! Thanks in advance

© Stack Overflow or respective owner

Related posts about unity

Related posts about multi-tenant