Finbuckle.MultiTenant
Finbuckle.MultiTenant copied to clipboard
Creating a tenant is not creating a database for it
I'm using separate multi-tenant databases, but when I create a multi tenant using IMultiTenant Store and using the TryAdd() method it creates the row in table Tenants but it doesn't create a database for the tenant itself although I'm adding a connection string when creating it.
Hello, The library will not actually create databases for you -- TryAdd is to add a tenant to the existing tenant store database not the database itself. For now the responsibility of creating the databases is up the your application or external processes.
You can use {dbContext}.Database.EnsureCreated() in your code to programmatically create the database if needed.