Asp.Net Core multi-tenant application Sample using #SaaSKit
This application is upgraded to support .Net Core 2.1.
Currently HTTPS
redirection is not supported.
Nothing Complex.
I followed separate database per tenant approach.
In NetCoreSaaS.Data
project we have three different context.
SystemDbContext
holds application/system level dataCatalogDbContext
holds tenant level data like tenant configurationTenantDbContext
holds tenant specific data like tenant user, other tenant dataData
folder of NetCoreSaaS.WebHost
). If you want to re-create migration later check TempFiles
folder in NetCoreSaaS.WebHost
for migration scripts. Run System Database
and Catalog Database
migration only.NetCoreSaaS_Catalogdb
with tenant data.http://*.localhost:6001
(you can find configuration in Program.cs
file.) Default seeding has only added two tenant which hostname are http://tenant1.localhost:6001
and http://tenant2.localhost:6001
therefore request from only these two hostname will be resolved else tenant will not resolve. You can find seeding in NetCoreSaaS.WebHost > Infrastructures > Helpers > DbHelper
folder.http://tenant1.localhost:6001
and http://tenant2.localhost:6001
you can find same site for two virtual shop(tenants).More feature and documentation are comming...