I am developing a multi-tenant application using ASP.NET MVC, and after doing a good research on multi-tenancy and SaaS I have found there are many resources available to implement data layer (database: separation by Schema, by database or shared) but very limited resources are available to implement Business and UI layer though.
I have picked up separate database approach.
Now in order to make it truly multi-tenant I have chosen plugin based architecture (like umbraco and Nopcommerce) where plugin is an MVC application with tenant based model, view and controller.
Here is how I am going to develop it:
Controller factory will be initialized based on tenant (subdomain)
Business layer will be injected (using DI) based on tenant.
and UI (View) will be rendered based on plugin.
But in this way everything is being redundant, not able to share common behaviour.
Can anyone help to design it the way I can share common behaviour or is there any better approach doing so?