-
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @denxpert, You can't (and shouldn't) add extra parameters to the AuthP entity classes. Only the AuthP code should have access the AuthP DbContext. But of course you might want to hold extra data for your application, so this is how I do this.
The three database parts of an multi-tenant application, that is authentication handler, AuthP's DbContext and your tenant data DbContext, are separated from each other and migrated separately. I set the schema names on the AuthP's DbContext and the tenant data DbContext to make this segregation more obvious and ensure that table names are unique. You can remove the schema from the tenant data, but the AuthP's DbContext has fixed schema name. |
Beta Was this translation helpful? Give feedback.
Hi @denxpert,
You can't (and shouldn't) add extra parameters to the AuthP entity classes. Only the AuthP code should have access the AuthP DbContext. But of course you might want to hold extra data for your application, so this is how I do this.
CompanyTenant
which holds the tenant name, but in a real application I would store more information in a class like that.