MulitTanancy Using Multiple Database Sample Code
Want to creat a multi-tenancy application? You can use the Tenancy package to create a multi-tenancy application with multiple database and multiple domains support.
Here is a simple instruction for you to create a multi-tenancy application in windows system.
Please read from Here