I’m following this example to develop a multi tenant app: Simple approach to multi-tenancy in ASP.NET MVC Part 2
Instead using StructureMap I’m using Ninject. In the example is used this inteface:
IContainerResolver – gets the IoC container for the resolved tenant
But I can’t understand how to use it with Ninject. Is some sort NinjectModule so each tenant has his proper bindings?
Can you explain to me Why is used and How I must use it with Ninject?
First of all I wouldn’t do such a thing in the given scenario because you can leave that up to IIS. Just deploy your app for your tenants with a different App.config have a really reliable separation of the memory.
But if you really want to go that way there is a very simple solution by loading tenant modules into one shared kernel: